You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for this project and the video, very helpful for getting into DOTS.
Just a heads up, I am using different versions on Unity (2019.3.2f1) and the other packages (attached image) needed for this project.
Now for the issue:
In GameManager when I call GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld( World.DefaultGameObjectInjectionWorld, null ); ballEntityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy( ballPrefab, settings );
I get multiple errors on the second line. It seems it has to do with leaving the second argument in the FromWorld function null.
I have attached an image and text of the errors below.
For 2021 users...
Instead of passing null: GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld( World.DefaultGameObjectInjectionWorld, null );
You need to pass a new BlobAssetStore() instead.
However, since the blob needs to be disposed, you should cache it in Awake(), then call blob.Dispose() in OnDestroy()
Hello,
First of all thank you for this project and the video, very helpful for getting into DOTS.
Just a heads up, I am using different versions on Unity (2019.3.2f1) and the other packages (attached image) needed for this project.
Now for the issue:
In GameManager when I call
GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld( World.DefaultGameObjectInjectionWorld, null ); ballEntityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy( ballPrefab, settings );
I get multiple errors on the second line. It seems it has to do with leaving the second argument in the FromWorld function null.
I have attached an image and text of the errors below.
Thanks in advance!
ArgumentNullException: A valid BlobAssetStore must be passed to construct a BlobAssetComputationContext
Parameter name: blobAssetStore
Unity.Entities.BlobAssetComputationContext`2[TS,TB]..ctor (Unity.Entities.BlobAssetStore blobAssetStore, System.Int32 initialCapacity, Unity.Collections.Allocator allocator) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/BlobAssetComputationContext.cs:32)
Unity.Physics.Authoring.BeginColliderConversionSystem.OnUpdate () (at Library/PackageCache/com.unity.physics@0.3.1-preview/Unity.Physics.Hybrid/Conversion/BeginColliderConversionSystem.cs:20)
Unity.Entities.ComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:134)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
Unity.Entities.Conversion.JournalingUnityLogger:LogException(Exception, Object) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/JournalingUnityLogger.cs:50)
UnityEngine.Debug:LogException(Exception)
Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/Stubs/Unity/Debug.cs:19)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:138)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.GameObjectConversionUtility:Convert(World) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:146)
Unity.Entities.GameObjectConversionUtility:ConvertGameObjectHierarchy(GameObject, GameObjectConversionSettings) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:233)
GameManager:Awake() (at Assets/Scripts/GameManager.cs:41)
NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <94c5f4c38cdc42d2b006f8badef04394>:0)
Unity.Collections.NativeHashMap
2[TKey,TValue].ContainsKey (TKey key) (at Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/NativeHashMap.cs:242) Unity.Entities.BlobAssetComputationContext
2[TS,TB].NeedToComputeBlobAsset (Unity.Entities.Hash128 hash) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/BlobAssetComputationContext.cs:97)Unity.Physics.Authoring.BaseShapeConversionSystem
1[T].GetInputDataFromAuthoringComponent (T shape) (at Library/PackageCache/com.unity.physics@0.3.1-preview/Unity.Physics.Hybrid/Conversion/BaseShapeConversionSystem.cs:58) Unity.Physics.Authoring.BaseShapeConversionSystem
1[T].OnUpdate () (at Library/PackageCache/com.unity.physics@0.3.1-preview/Unity.Physics.Hybrid/Conversion/BaseShapeConversionSystem.cs:146)Unity.Entities.ComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:134)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
Unity.Entities.Conversion.JournalingUnityLogger:LogException(Exception, Object) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/JournalingUnityLogger.cs:50)
UnityEngine.Debug:LogException(Exception)
Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/Stubs/Unity/Debug.cs:19)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:138)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.GameObjectConversionUtility:Convert(World) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:146)
Unity.Entities.GameObjectConversionUtility:ConvertGameObjectHierarchy(GameObject, GameObjectConversionSettings) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:233)
GameManager:Awake() (at Assets/Scripts/GameManager.cs:41)
The text was updated successfully, but these errors were encountered: