Default values and assetbundles

Forums 💬 FlowCanvas ⚙️ Support Default values and assetbundles

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22040
    gislesolvberg
    Participant

      Hello
      After updating to 2.7.0f1 I have been experiencing some trouble with setting values directly on nodes included in asset bundles. Everything seems to work fine in the editor but when I build my bundles and run the game some of these values are reset to their default value. I have only noticed this happening with bools, even though I set the node value directly many other places. If I connect a bool variable to the node the issue seems to disappear.

      The nodes are part of a bound canvas within a scene, which is then included in a bundle.

      I’m hoping this is a bug, as it was working fine in the previous version, and I really like being able to set the value directly on the node.

      When I build the asset bundles, I get this error from unity, also new in this version:
      This particular error seems to be concerning the Color type, but I get 100s of the same error concerning other data types.

      NullReferenceException: Object reference not set to an instance of an object
      ParadoxNotion.Design.UserTypePrefs.GetTypeIcon (System.Type type, Boolean fallbackToDefault) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Design/PartialEditor/UserTypePrefs.cs:255)
      FlowCanvas.Port.CacheGUIContent () (at Assets/ParadoxNotion/FlowCanvas/Module/Ports.cs:46)
      FlowCanvas.Port..ctor (FlowCanvas.FlowNode parent, System.String name, System.String ID) (at Assets/ParadoxNotion/FlowCanvas/Module/Ports.cs:22)
      FlowCanvas.ValueInput..ctor (FlowCanvas.FlowNode parent, System.String name, System.String ID) (at Assets/ParadoxNotion/FlowCanvas/Module/Ports.cs:237)
      FlowCanvas.ValueInput1[UnityEngine.Color]..ctor (FlowCanvas.FlowNode parent, System.String name, System.String ID) (at Assets/ParadoxNotion/FlowCanvas/Module/Ports.cs:266)
      FlowCanvas.FlowNode.AddValueInput[Color] (System.String name, System.String ID) (at Assets/ParadoxNotion/FlowCanvas/Module/FlowNode.cs:280)
      FlowCanvas.Nodes.LatentActionNode
      3[UnityEngine.Color,UnityEngine.Color,System.Single].OnRegisterDerivedPorts (FlowCanvas.FlowNode node) (at Assets/ParadoxNotion/FlowCanvas/Module/Nodes/Functions/Implemented/LatentActionNode.cs:151)
      FlowCanvas.Nodes.LatentActionNodeBase.OnRegisterPorts (FlowCanvas.FlowNode node) (at Assets/ParadoxNotion/FlowCanvas/Module/Nodes/Functions/Implemented/LatentActionNode.cs:108)
      FlowCanvas.Nodes.SimplexNode.RegisterPorts (FlowCanvas.FlowNode node) (at Assets/ParadoxNotion/FlowCanvas/Module/Nodes/Functions/Implemented/SimplexNode.cs:55)
      FlowCanvas.Nodes.SimplexNodeWrapper`1[FlowCanvas.Nodes.CameraFade].RegisterPorts () (at Assets/ParadoxNotion/FlowCanvas/Module/Nodes/Functions/Implemented/SimplexNodeWrapper.cs:78)
      FlowCanvas.FlowNode.GatherPorts () (at Assets/ParadoxNotion/FlowCanvas/Module/FlowNode.cs:198)
      FlowCanvas.FlowNode.OnValidate (NodeCanvas.Framework.Graph flowGraph) (at Assets/ParadoxNotion/FlowCanvas/Module/FlowNode.cs:76)
      NodeCanvas.Framework.Graph.Validate () (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:230)
      UnityEngine.Logger:LogException(Exception)
      ParadoxNotion.Services.Logger:ForwardToUnity(LogType, Object, String, Object) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Runtime/Services/Logger.cs:90)
      ParadoxNotion.Services.Logger:Internal_Log(LogType, Object, String, Object) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Runtime/Services/Logger.cs:84)
      ParadoxNotion.Services.Logger:LogException(Exception, String, Object) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Runtime/Services/Logger.cs:47)
      NodeCanvas.Framework.Graph:Validate() (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:231)
      NodeCanvas.Framework.Graph:OnEnable() (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:79)
      UnityEditor.BuildPipeline:BuildAssetBundles(String, BuildAssetBundleOptions, BuildTarget)
      Scripts.Bjorn.BuildInstructions:BuildAssetBundlesWindows(Boolean) (at Assets/Scripts/Build/Editor/BuildInstructions.cs:110)
      Scripts.Bjorn.BuildInstructionsWindow:ShowBundlesSettings() (at Assets/Scripts/Build/Editor/BuildInstructionsWindow.cs:76)
      Scripts.Bjorn.BuildInstructionsWindow:OnGUI() (at Assets/Scripts/Build/Editor/BuildInstructionsWindow.cs:56)
      UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

      #22043
      rami_falldamage
      Participant

        Also getting this error when building. Fixed it by null checking the texture object being accessed from the dictionary, which should not be null in the first place.

        #22042
        gislesolvberg
        Participant

          Thank you, I tried the fix and so far it seems that it solved all my problems. Cheers!

          #22041
          Gavalakis
          Keymaster

            Hello guys and happy new year!
            Thank you for the report as well as for the quick fix 🙂 I will take a closer look at this.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.