scriptable-object-based-guns icon indicating copy to clipboard operation
scriptable-object-based-guns copied to clipboard

Sample scene errors

Open Lyten02 opened this issue 1 year ago • 3 comments

Unity version: Mac silicon 2022.3.4f1 I downloaded the project as a zip file and started the project without doing any other things

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.GetRaycastOrigin () (at Assets/Scripts/Guns/GunScriptableObject.cs:309) LlamAcademy.Guns.Demo.PlayerAction.UpdateCrosshair () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:46) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:41)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.TryToShoot () (at Assets/Scripts/Guns/GunScriptableObject.cs:190) LlamAcademy.Guns.GunScriptableObject.Tick (System.Boolean WantsToShoot) (at Assets/Scripts/Guns/GunScriptableObject.cs:125) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:26)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.Demo.Editors.PlayerActionEditor.OnSceneGUI () (at Assets/Scripts/Guns/Demo/Editor/PlayerActionEditor.cs:28) (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,UnityEditor.Editor) UnityEditor.SceneView.CallOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3782) UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2817) UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2485) UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2325) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:355) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

There are other errors there, just they are not so critical.

Lyten02 avatar Mar 11 '24 16:03 Lyten02

I’m confused Sent from my iPhoneOn Mar 11, 2024, at 12:09 PM, Kosty @.***> wrote: Unity version: Mac silicon 2022.3.4f1 I downloaded the project as a zip file and started the project without doing any other things

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.GetRaycastOrigin () (at Assets/Scripts/Guns/GunScriptableObject.cs:309) LlamAcademy.Guns.Demo.PlayerAction.UpdateCrosshair () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:46) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:41)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.TryToShoot () (at Assets/Scripts/Guns/GunScriptableObject.cs:190) LlamAcademy.Guns.GunScriptableObject.Tick (System.Boolean WantsToShoot) (at Assets/Scripts/Guns/GunScriptableObject.cs:125) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:26)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.Demo.Editors.PlayerActionEditor.OnSceneGUI () (at Assets/Scripts/Guns/Demo/Editor/PlayerActionEditor.cs:28) (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,UnityEditor.Editor) UnityEditor.SceneView.CallOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3782) UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2817) UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2485) UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2325) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:355) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190) There are other errors there, just they are not so critical.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

rolandrnf6 avatar Mar 11 '24 22:03 rolandrnf6

My bad I didn’t mean to make this public. I’ll put the working version on GitHub soon Sent from my iPhoneOn Mar 11, 2024, at 12:09 PM, Kosty @.***> wrote: Unity version: Mac silicon 2022.3.4f1 I downloaded the project as a zip file and started the project without doing any other things

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.GetRaycastOrigin () (at Assets/Scripts/Guns/GunScriptableObject.cs:309) LlamAcademy.Guns.Demo.PlayerAction.UpdateCrosshair () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:46) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:41)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.GunScriptableObject.TryToShoot () (at Assets/Scripts/Guns/GunScriptableObject.cs:190) LlamAcademy.Guns.GunScriptableObject.Tick (System.Boolean WantsToShoot) (at Assets/Scripts/Guns/GunScriptableObject.cs:125) LlamAcademy.Guns.Demo.PlayerAction.Update () (at Assets/Scripts/Guns/Demo/PlayerAction.cs:26)

NullReferenceException: Object reference not set to an instance of an object LlamAcademy.Guns.Demo.Editors.PlayerActionEditor.OnSceneGUI () (at Assets/Scripts/Guns/Demo/Editor/PlayerActionEditor.cs:28) (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,UnityEditor.Editor) UnityEditor.SceneView.CallOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3782) UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2817) UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2485) UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2325) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:355) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190) There are other errors there, just they are not so critical.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

rolandrnf6 avatar Mar 11 '24 22:03 rolandrnf6

Hi! Have you followed the setup instructions to ensure you have the Unity Particle Pack installed and have a Particle System at the tip of your gun model? That error is commonly reported when the Unity Particle Pack has not been imported and a Gun model does not have a Particle System as a child.

The rest of your errors all seem to also point to a null reference related to the particle system.

Check the Quickstart on the readme and let me know if you still encounter the issue from there!

llamacademy avatar Mar 12 '24 00:03 llamacademy

Since this has not received any updates I will close this. Please reopen a new issue if the above did not help you resolve the issue.

llamacademy avatar Jul 21 '24 12:07 llamacademy