Code Monkey home page Code Monkey logo

Comments (14)

 avatar commented on July 21, 2024

I've got gokit running in a bunch of projects on Unity 5. What are you seeing?

On Tue, Jun 9, 2015 at 5:04 PM, AaronRelish [email protected]
wrote:

Hey guys. As you may know, Apple just began enforcing the inclusion of 64-bit architecture in all ios submissions. For those created in Unity, this requires using the 'IL2CPP' scripting backend rather than 'Mono 2.1' in order to enable 'Universal' in the Architecture Settings.

Does Prime31 have any plans to update GoTween to accommodate this new restriction? Presently it works fine in the IDE, but most tweens cause errors on iOS.

Reply to this email directly or view it on GitHub:
#70

from gokit.

AaronRelish avatar AaronRelish commented on July 21, 2024

It's not a Unity 5 thing, it only comes up when using the architecture requirements now required by apple. To reproduce it, you'd have to make the iOS export changes I mentioned above (Change Scripting Backend to 'IL2CPP' and Architecture to 'Universal'), run a build out to XCode, and test on a device. Ideally your test case would have extensive use of GoTween, with features like completion handlers and chaining.

from gokit.

 avatar commented on July 21, 2024

Yup. What issues are you seeing? 

On Tue, Jun 9, 2015 at 5:31 PM, AaronRelish [email protected]
wrote:

It's not a Unity 5 thing, it only come up when using the architecture requirements now required by apple. To reproduce it, you'd have to make the iOS export changes I mentioned above (Change Scripting Backend to 'IL2CPP' and Architecture to 'Universal'), run a build out to XCode, and test on a device. Ideally your test case would have extensive use of GoTween, with features like completion handlers and chaining.

Reply to this email directly or view it on GitHub:
#70 (comment)

from gokit.

 avatar commented on July 21, 2024

Was on the road earlier -- I'd love a stack trace to help us narrow down some of the issues. I'm aware of one problem right now with canvasGroup.alpha. More is always helpful, though.

from gokit.

AaronRelish avatar AaronRelish commented on July 21, 2024

Sure thing, I'll have to grab that when I'm back in the office tomorrow morning.

from gokit.

 avatar commented on July 21, 2024

Hey Aaron -- still waiting on some examples that cause the issue.

I don't think I'm going to be able to take some time tonight to create a test case, but it seems like the main reason why these things are occurring is that some of the property references that you are using are being accessed via reflection, and and those classes are being stripped out with the IL2CPP build process.

These would be things like floatProp, colorProp, and a bunch of others. You need to make sure you're adding the objects within the link.xml file so Unity doesn't strip those classes on build: http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

Please let me know if this helps resolve your issue. Not quite sure what we can do to resolve this automatically.

from gokit.

NoobsArePeople2 avatar NoobsArePeople2 commented on July 21, 2024

Hey @zapdot I'm having a similar issue and hoping you can help out. We're doing an iOS build using IL2CPP to satisfy Apple's 64-bit requirements and having some issues with tweens. The messages we're getting look like this:

ArgumentNullException: Argument cannot be null.
Parameter name: method
  at System.Type.GetTypeFromHandle (RuntimeTypeHandle handle) [0x00000] in <filename unknown>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 
  at GoTweenUtils.getterForProperty[Func`1] (System.Object targetObject, System.String propertyName) [0x00000] in <filename unknown>:0 
  at FloatTweenProperty.prepareForUse () [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at GoTween.onInit () [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at GoTween.update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at Go.handleUpdateOfType (GoUpdateType updateType, Single deltaTime) [0x00000] in <filename unknown>:0 
  at Go.Update () [0x00000] in <filename unknown>:0 
  at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])

and

ArgumentNullException: Argument cannot be null.
Parameter name: method
  at System.Type.GetTypeFromHandle (RuntimeTypeHandle handle) [0x00000] in <filename unknown>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 
  at GoTweenUtils.getterForProperty[Func`1] (System.Object targetObject, System.String propertyName) [0x00000] in <filename unknown>:0 
  at ColorTweenProperty.prepareForUse () [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at GoTween.onInit () [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at GoTween.update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at UnityEngine.Advertisements.ShowOptions.set_resultCallback (System.Action`1 value) [0x00000] in <filename unknown>:0 
  at Go.handleUpdateOfType (GoUpdateType updateType, Single deltaTime) [0x00000] in <filename unknown>:0 
  at Go.Update () [0x00000] in <filename unknown>:0 
  at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])

Some of these are tweens on colors, others on the anchoredPosition3D of RectTransforms. Some tweens use onComplete() callbacks.

Can you provide an example of what I'd need to put in my link.xml file? It's not really clear to me what should go in it Do I need to put GoKit classes in there or something else?

from gokit.

prime31 avatar prime31 commented on July 21, 2024

Unity's link.xml docs are here: http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html GoKit uses reflection to fetch the getter/setter so the section "How to Deal with Stripping when Using Reflection" is relevant.

from gokit.

markyama avatar markyama commented on July 21, 2024

Sorry to reopen this. But I'm having this same problem. I have read the "How to Deal with Stripping when Using Reflection". Unfortunately, I am newer to C# and Unity, and I'd really appreciate some help on what to put in the link.xml file. I'm using the GoKit floatProp on my the main camera's Camera.fieldOfView variable. Can you help me with what I'd put in my link.xml file?

Any help would be greatly appreciated.

from gokit.

 avatar commented on July 21, 2024

If your link.xml file is empty/non-existent, you'd create the "link.xml"
file in your Assets directory, and put this in it:

<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.Camera" preserve="all"/>
    </assembly>
</linker>

from gokit.

markyama avatar markyama commented on July 21, 2024

Thanks so much for the help, that worked perfectly!

from gokit.

MarcL avatar MarcL commented on July 21, 2024

Hi @zapdot.

Sorry to comment on an old thread but I've come across the same issue with GoKit and I'm having trouble determining how to stop the code stripping too.

My code that's calling GoKit is doing an alpha fade within a class called AlphaFader:

Go.to(spriteRenderer, fadeTime, new GoTweenConfig().colorProp("color", new Color(1.0f, 1.0f, 1.0f, alpha)).onComplete(onComplete));

And my link.xml (which doesn't currently work) is:

<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.WWW" preserve="all" />
    </assembly>
    <assembly fullname="Assembly-CSharp-firstpass">
        <type fullname="AlphaFader" preserve="all" />
    </assembly>
</linker>

Do I need to preserve GoKit rather than my AlphaFader class?
Sorry, it's unclear from the Unity documentation as to what the assembly and type names should be. I've made the assumption that it's within the Assembly-CSharp-firstpass but this may be wrong too!

Thanks for your help.

from gokit.

 avatar commented on July 21, 2024

So the problem isn't your class that is using this, it's the class/property that you're trying to reference via reflection. Since you are trying to edit the spriteRenderer.color property, the SpriteRenderer class is the one you want to add to the link.xml.

If you look at the Scripting API: http://docs.unity3d.com/ScriptReference/SpriteRenderer.html

You'll see that's in the UnityEngine namespace.

So your link.xml should look like:

<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.WWW" preserve="all" />
        <type fullname="UnityEngine.SpriteRenderer" preserve="all" />
    </assembly>
</linker>

Let me know if you have any more questions.

from gokit.

MarcL avatar MarcL commented on July 21, 2024

@zapdot Thank you so much! That's the clearest explanation I've read of the link file and I was completely misunderstanding it. It seems so obvious now you've said it that it's the reflected field of the used class that has no reference.

Your link.xml works great! Thanks again.

from gokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.