Search Unity

[Entities 0.0.12-preview.20]GameObjectEntity is missing by AssetBundle

Discussion in 'Entity Component System' started by linfuqing, Nov 16, 2018.

  1. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    When i build an GameObjectEntity prefab to AssetBundle,get the warning: "The class named 'Unity.Entities.GameObjectEntity' is not derived from MonoBehaviour or ScriptableObject!" when it be loaded.
    But is run well before preview.16,why?
    upload_2018-11-16_12-44-29.png
    upload_2018-11-16_12-45-5.png
    upload_2018-11-16_12-45-49.png
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
  3. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    I tred,but it's not work.

    I build a prefab(GameObjectEntity) to assetbundle use 0.0.12-preview.20,it can not be loaded on the preview.20.
    But it work well if i load it on the preview.15.

    Sorry my english so pool.
     
  4. Adam-Mechtley

    Adam-Mechtley

    Administrator

    Joined:
    Feb 5, 2007
    Posts:
    290
    Hi! We saw something maybe similar on our sample game team internally, which was caused by their using an internalized version of the package (i.e. they had put a writable copy of the package in their packages folder). Are you doing anything like this, or just pointing directly do the one in your library?
     
  5. Mogens_H

    Mogens_H

    Unity Technologies

    Joined:
    Mar 7, 2017
    Posts:
    20
    In next release (in a few days hopefully) we dont use internalized version of the entities package - and that should solve the problem.
     
  6. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    I get the package from Package Manager.
    I tried to delete the folder of "AppData\Local\Unity\cache\packages\staging-packages.unity.com" and reimport all assets.
    but the same problem remains.
     
  7. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    my unity version is 2018.2.15f1
     
  8. Adam-Mechtley

    Adam-Mechtley

    Administrator

    Joined:
    Feb 5, 2007
    Posts:
    290
    Just to narrow this down: Have you kept your Unity version constant and tried rolling back the package to preview15?
     
  9. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Yes.I keep the Unity version constant and roll back the package to preview 15, and load the assetbundle which build in preview 20,it's run well.
    but if I load the same assetbundle in preview 20,the script "GameObjectEntity" will missing.
     
  10. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    I test again in preview 21 today.The problem has not been solved.
     
  11. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Hi,I update unity version to 2018.3,get the error message:
    'Unity.Entities.GameObjectEntity' is missing the class attribute 'ExtensionOfNativeClass'!

    It's no problem if I copy com.unity.entities package from folder "Packages" to "Assets" and remove entities from the Package Manager, but Entity Debugger Window can not be open.
    How can I fix it?
     
  12. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Hi~I upload a test here:
    1.Build the "Assets\GameObject.Prefab" to AssetBundle and copy to "Assets\StreamingAssets"
    2.Load the AssetBundle and Instantiate it in "Asset\Test.cs".
    upload_2018-12-26_15-38-38.png
     

    Attached Files:

  13. zanius

    zanius

    Joined:
    Feb 5, 2018
    Posts:
    24
    I had this error as well when loading GameObjectEntity prefabs in an asset bundle. Upgrading to the 2019.1 beta fixed it.
     
    learc83 likes this.