Forum rules - please read before posting.

Getting error on SerializedPropertyBindings at runtime

Hi,

I keep getting errors at runtime on the SerializedPropertyBindings.gen.cs
I think they appear when I use the Remember Trigger script on the triggers.

Using Unity 5.4.0 and AC 1.54

NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) (at C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:74)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:154)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:147)
UnityEditor.GameObjectInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:86)

Comments

  • Welcome to the forum, @eirsik.

    At exactly what point do these errors appear, and do they appear to have any impact on your game?  What platform are you working on, and building to?

    Though it may be caused by your use of the RememberTrigger component, the error messages themselves don't refer to any of AC's scripts.  Try restarting Unity, and if that doesn't solve it, post screenshots of the faulty object Inspector along with clear steps to reproduce the issue.
  • It happens when I hit the "Play" button to test my game.

    From the looks of it, it does not impact the game at all. However I have not tested the Save / Load function yet.

    I've also found another issue that drives me crazy. In the ActionList Using Object -> Call Event, If I use this to set a light intensity or activate or deactiva an GameObject, the value in the Call Event Node resets to null when leaving the ActionList window or when TestPlay the game.

    Before Leaving the ActionList window:

    image

    After Leaving the ActinList window:

    image

    The same happens with floats as well, the float value goes back to "0" which is the initial value when adding the node. I have to try to get it to stay multiple times before the value is stored and not changed. it drives me crazy, lol
  • Tried to use PlayMaker to get around this annoying issue, but same thing happens. Once I leave the ActionList window and select another object in the scene, or testplay the scene, the value resets to empty or initial value (0) if float.

    Before leaving the ActionList window:

    image

    After leaving the ActionList window:

    image
  • In future, please try to post unrelated questions in separate threads, to make them more search-friendly for future users.

    Unfortunately Unity does not allow (that I know of) for the setting of Event parameters that are within a custom UI - this is why the parameter isn't saved.  A script attached with functions to disable / enable your GameObject manually could be written easily enough, and those functions could then be called with "Object: Send message".

    In general though, it's not recommended to disable GameObjects completely as it creates issues when saving game data.  Whenever possible, it's instead recommended to hide them from view via the Object: Teleport Action and attaching the RememberTransform component.
  • edited November 2016
    Hi and thanks for you reply.

    If it's not allowed why would you even have that node, and why did I make it work after multiple tries in my other Interaction sequence? One sequence is to change the Light intensity and it works fine with Call Event. I needed 100 attempts to make the AC save the parameter but it did eventually.

    As for the disable object, its about enabling a particle effect. Spawning it would mess up the transform.

    EDIT: I will just use the PlayMaker Integration to do my dirty work.
  • edited November 2016
    It's there because you can still use it to trigger functions that have no parameter.  What did you do for the 100 attempts to make it work, I actually haven't had that happen for me at all.

    AC includes a "Particle Switch" component which you can attach to a ParticleSystem.  It includes TurnOn and TurnOff functions that you can call with the Object: Call event Action, and require no parameters.
  • Ah I see. I cant reproduce it actually. But I have a Call Event that changes the float value on a light object working.

    Ah, thats actually great to know, thanks! What about modifying lights? Any included components for that? I have PlayMaker and with its AC integration I just use PM to do stuff like that and it works pretty well.
  • The LightSwitch component is more of an example component, as it shows how you can easily write a component that you can call with AC.  AC also has the ability to write custom Actions, that allow you to do basically anything with a little scripting know-how.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.