Cheo
Active member
Hello, I imported the latest version of BDP (3.1.0) and the Senses add-on (1.0.6) in a project using Unity 6.3.9f1, and got this error when starting the demo scene :
Also a user on the Discord named PoisonedAl shared a screenshot of Gizmos related errors : https://discord.com/channels/476506682382483456/487791916314918912/1515435595097309386
C#:
[Exception] NullReferenceException: Object reference not set to an instance of an object
Visibility.GetVisibility() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Sensors/Visibility.cs:164
163: // The target object needs to be within the field of view of the current object.
--> 164: var originator = m_PivotGameObject.Value != null ? m_PivotGameObject.Value.transform : m_Transform;
165: var position = originator.TransformPoint(m_PivotOffset.Value);
166: var targetPosition = target.transform.TransformPoint(m_TargetOffset.Value);
Visibility+<>c__DisplayClass19_0.<GetDetectedVisibility>b__0() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Sensors/Visibility.cs:124
122: m_DetectionModes[i].DetectObjects(m_GameObject.transform.position, m_Distance.Value, (GameObject target) =>
123: {
--> 124: var distance = GetVisibility(target);
125: if (distance < closestDistance) {
126: detectedObject = target;
ObjectDetectionMode.DetectObjects() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Sensors/DetectionMode.cs:48
46: public override void DetectObjects(Vector3 position, float magnitude, Func<GameObject, bool> onFilterObject)
47: {
--> 48: onFilterObject(m_Object.Value);
49: }
50: }
Visibility.GetDetectedVisibility() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Sensors/Visibility.cs:122
120: var closestDistance = float.MaxValue;
121: for (int i = 0; i < m_DetectionModes.Length; ++i) {
--> 122: m_DetectionModes[i].DetectObjects(m_GameObject.transform.position, m_Distance.Value, (GameObject target) =>
123: {
124: var distance = GetVisibility(target);
Visibility.GetDetectedObject() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Sensors/Visibility.cs:71
69: public GameObject GetDetectedObject()
70: {
--> 71: return GetDetectedVisibility().Item1;
72: }
CanDetectObject.OnUpdate() at /Opsive/BehaviorDesigner/Add-Ons/SensesPack/Scripts/Tasks/CanDetectObject.cs:52
50: }
--> 52: var detectedObject = m_Sensor.GetDetectedObject();
53: if (m_ReturnedObject.IsShared) {
54: m_ReturnedObject.Value = detectedObject;
StackedTask.OnUpdate() at ./Packages/com.opsive.behaviordesigner/Runtime/Tasks/StackedTask.cs:278
276: }
--> 278: var executionStatus = m_Tasks[m_ActiveIndex].OnUpdate();
279: if (executionStatus == TaskStatus.Running) {
280: return TaskStatus.Running;
TaskObjectSystem.OnUpdate() at ./Packages/com.opsive.behaviordesigner/Runtime/Systems/TaskObjectSystem.cs:178
176: }
--> 178: var status = task.OnUpdate();
179: // Update the status if has changed.
180: if (status != taskComponent.Status) {
TaskObjectSystem.__codegen__OnUpdate() at <f83e7b04cd7c40c8930ecad629b8073a>:0
SystemBaseRegistry+<>c__DisplayClass9_0.<SelectBurstFn>b__0() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBaseRegistry.cs:249
247: try
248: {
--> 249: managedFn(system, state);
250: }
251: catch (Exception ex)
Debug.LogException()
Debug.LogException() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/Stubs/Unity/Debug.cs:17
15: UnityEngine.Debug.Log(message);
16: public static void LogException(Exception exception) =>
--> 17: UnityEngine.Debug.LogException(exception);
19: public static void LogError(object message, UnityObject context) =>
Unity.Entities.<>c__DisplayClass9_0.<SelectBurstFn>b__0() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBaseRegistry.cs:253
251: catch (Exception ex)
252: {
--> 253: Debug.LogException(ex);
254: }
255: };
Unity.Entities.UnmanagedUpdate_00001691$BurstDirectCall.wrapper_native_indirect_00000149098910B0()
Unity.Entities.UnmanagedUpdate_00001691$BurstDirectCall.Invoke()
WorldUnmanagedImpl.UnmanagedUpdate()
WorldUnmanagedImpl.UpdateSystem() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/WorldUnmanaged.cs:926
924: try
925: {
--> 926: UnmanagedUpdate(sys);
927: }
928: catch
ComponentSystemGroup.UpdateAllSystems() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:717
715: // Update unmanaged (burstable) code.
716: var handle = m_UnmanagedSystemsToUpdate[index.Index];
--> 717: worldImpl.UpdateSystem(handle);
718: }
719: else
ComponentSystemGroup.OnUpdate() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:681
679: if (RateManager == null)
680: {
--> 681: UpdateAllSystems();
682: }
683: else
TraversalTaskSystemGroup.OnUpdate() at ./Packages/com.opsive.behaviordesigner/Runtime/Groups/TaskSystemGroup.cs:58
56: }
--> 58: base.OnUpdate();
60: if (OnPostUpdate != null) {
SystemBase.Update() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBase.cs:420
418: }
--> 420: OnUpdate();
421: #if ENABLE_UNITY_COLLECTIONS_CHECKS
422: success = true;
ComponentSystemGroup.UpdateAllSystems() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:723
721: // Update managed code.
722: var sys = m_managedSystemsToUpdate[index.Index];
--> 723: sys.Update();
724: }
725: }
ComponentSystemGroup.OnUpdate() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:681
679: if (RateManager == null)
680: {
--> 681: UpdateAllSystems();
682: }
683: else
TraversalSystemGroup.OnUpdate() at ./Packages/com.opsive.behaviordesigner/Runtime/Groups/TraversalSystemGroup.cs:29
27: bool evaluate;
28: do {
--> 29: base.OnUpdate();
31: evaluate = BehaviorTreeExecution.CompleteTraversal(World, EntityManager);
SystemBase.Update() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBase.cs:420
418: }
--> 420: OnUpdate();
421: #if ENABLE_UNITY_COLLECTIONS_CHECKS
422: success = true;
ComponentSystemGroup.UpdateAllSystems() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:723
721: // Update managed code.
722: var sys = m_managedSystemsToUpdate[index.Index];
--> 723: sys.Update();
724: }
725: }
ComponentSystemGroup.OnUpdate() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:681
679: if (RateManager == null)
680: {
--> 681: UpdateAllSystems();
682: }
683: else
BehaviorTreeSystemGroup.OnUpdate() at ./Packages/com.opsive.behaviordesigner/Runtime/Groups/BehaviorTreeSystemGroup.cs:59
57: protected override void OnUpdate()
58: {
--> 59: base.OnUpdate();
61: // Stop running if all trees have completed.
SystemBase.Update() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBase.cs:420
418: }
--> 420: OnUpdate();
421: #if ENABLE_UNITY_COLLECTIONS_CHECKS
422: success = true;
ComponentSystemGroup.UpdateAllSystems() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:723
721: // Update managed code.
722: var sys = m_managedSystemsToUpdate[index.Index];
--> 723: sys.Update();
724: }
725: }
ComponentSystemGroup.OnUpdate() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ComponentSystemGroup.cs:681
679: if (RateManager == null)
680: {
--> 681: UpdateAllSystems();
682: }
683: else
SystemBase.Update() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/SystemBase.cs:420
418: }
--> 420: OnUpdate();
421: #if ENABLE_UNITY_COLLECTIONS_CHECKS
422: success = true;
Unity.Entities.DummyDelegateWrapper.TriggerUpdate() at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Entities/ScriptBehaviourUpdateOrder.cs:523
521: if (m_System.m_StatePtr != null)
522: {
--> 523: m_System.Update();
524: }
525: }
Also a user on the Discord named PoisonedAl shared a screenshot of Gizmos related errors : https://discord.com/channels/476506682382483456/487791916314918912/1515435595097309386