Sprites not moving in WebGL?

Forums 💬 NodeCanvas ⚙️ Support Sprites not moving in WebGL?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16231
    dharry
    Participant

      Sorry if this has been asked, but I can’t seem to find an answer… I have a few objects I am moving on a screen using FlowCanvas. They work fine when built for Windows but when built for WebGL they don’t work at all.

      They are throwing the error:

      3ffbed1e-1ebe-4c20-a9a7-2a2427e7054f:8 ExecutionEngineException: Attempting to call method ‘FlowCanvas.Nodes.SetVariable`1[[UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::.ctor’ for which no ahead of time (AOT) code was generated.

      Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.

      at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0

      (Filename: currently not available on il2cpp Line: -1)

      Is there a fix, or am I doing something wrong somewhere? I am new to NodeCanvas…

      Thanks in advance
      Dean Harry

       

      #16236
      Gavalakis
      Keymaster

        Hello Dean,

        To make NodeCanvas and/or FlowCanvas work on AOT platforms (like WebGL is), you need to please generate the AOTClasses and link.xml files which can automatically be done so through the Preferred Types Editor Window.
        Please take a look at this documentation section -> https://nodecanvas.paradoxnotion.com/documentation/?section=working-with-aot-platforms

        Let me know if the above helps and works for you.
        Thanks!

        #16235
        trianglehead
        Participant

          Once my build has the relevant files(AOTClasses and link.XML), does that mean I can change and add new logic at runtime via assetbundles without making another build?  I plan to use node canvas to add mini games in my main game without going through the App Store submission every time I want to add or change something small.

          #16234
          Gavalakis
          Keymaster

            Hello,

            If the build AOTClasses and link.xml already contain all possible types that are going to be imported via asset bundles in the future, then no, you do not need to rebuild the project. You will only need to if you have to add more types to the preferred types and re-generate the AOTClasses and link.xml. So your suggested workflow can be achieved. Just make sure to include all type you are going to use beforehand and only update if new types are required to be added.

            #16233
            trianglehead
            Participant

              Thx so much!  Does this apply to flow canvas the same way?

              #16232
              Gavalakis
              Keymaster

                Hello again,

                Yes it does apply to FlowCanvas exactly the same 🙂

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