Giter Club home page Giter Club logo

Comments (5)

amechtley avatar amechtley commented on May 22, 2024

Hi there! This sounds like another open case we have right now.

The issue is related to code stripping when building to IL2CPP. Because there are no references to the Unity.Entities.Hybrid assembly, the AutomaticWorldBootstrap that builds the ECS player loop gets stripped out. We will ultimately solve this by shuffling some stuff around into the proper assemblies, but in the meantime you can work around this by either:

  1. Have a GameObjectEntity component on something in your scene
  2. Add the Unity.Entities.Hybrid assembly to a link.xml file in your project (see https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html)

from entitycomponentsystemsamples.

levey-lee avatar levey-lee commented on May 22, 2024

I was building it using Mono. Do I have to choose IL2CPP for ECS to work? I've tried to build using IL2CPP but it didn't work out. An error message popped up say my desktop directory is not found, which is kind of weird though.

Back to the point, I've tried building it using Mono with a GameObjectEntity component attached to a cube, the problem still presents. Do I have to choose IL2CPP?

from entitycomponentsystemsamples.

amechtley avatar amechtley commented on May 22, 2024

No this sounds like it should work. Would you mind filing a bug report that shows the problem and pasting the case number here please?

from entitycomponentsystemsamples.

levey-lee avatar levey-lee commented on May 22, 2024

I just dived into the code and found the problem. In World.cs, there is a private method signature is private ScriptBehaviourManager CreateManagerInternal(Type type, int capacity, object[] constructorArguments)

In the first try block in that function, there's a line manager = Activator.CreateInstance(type, constructorArguments) as ScriptBehaviourManager; This line will fail on Android device if we do World.GetOrCreateManager<Unity.Rendering.MeshInstanceRendererSystem>(); Then in the catch block right after it an exception will be thrown. I guess in the editor, we would know if there's an exception being thrown, but there's no message at all if we run it on Android device, and the system will fail silently.

Hopefully that helps.

from entitycomponentsystemsamples.

leethomason avatar leethomason commented on May 22, 2024

This is tracked internally as 1160294. Closing this external issue - thanks for the info!

from entitycomponentsystemsamples.

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.