Unity 4.2 IOS Exception Handling
Hey Folks, I'm having trouble getting Unity to catch null pointer exceptions on IOS - even with explicit try/catch exceptions. Here's a rough sketch of my code https://gist.github.com/jmcguirk/6553120...
View ArticleIs there a way to know that Unity is quiting Play mode?
My scripts work just fine, but when I unpress Play more button in Editor I get a bunch of these errors: MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still...
View ArticleGameObject has been destroyed, but you are still trying to access it.
Ok, so I know this question has been asked a gazillion times. I see many answers for it, stating that the object needs to be checked for null. Which I do. Here's the thing. This only happens when I...
View ArticleGetComponent null reference C#
I have 2 scripts attached to a cube I'm trying to get variables from the other script,but it always comes up null. in the start function of the script , physics, I have void Start () { script =...
View ArticleUnity Crash loading my project!
Hello everyone, all of a sudden Unity started crashing when loading up my project. This happened after installing some old-school games on my computer so maybe that caused it but I already tried...
View ArticleNullRefernceExcepception with Raycasting
Run-Time Error: NullReferenceException: Object reference not set to an instance of an object Shooting Script.ForceFire () (at Assets/Scripts/Shooting Script.js:170) Shooting Script.Update () (at...
View ArticleNull reference when trying to return an object
I've been trying to break apart a simple pathfinder I built earlier into a few smaller classes in separate script files from one big file. However, I keep running into this null reference exception and...
View ArticleArrayTypeMismatchException: Source array type cannot be assigned to...
Here is the whole code: using UnityEngine; using System.Collections.Generic; public class ReflectionFx : MonoBehaviour { public Transform[] reflectiveObjects; public LayerMask reflectionMask; public...
View ArticleStylecop addin throw exception System.TypeInitializationException: The...
Hi guys, I managed to use stylecop (a static code analysis tool supported in MonoDevelop/VS by Microsoft) in MonoDevelop-Unity as an addin. It was installed successfully with just a few warnings, and...
View ArticleNullReferenceException in follow function
@HideInInspector var flw : Vector3 = Vector3.zero; var leader : GameObject; var enemy : GameObject; function Start () { leader = GameObject.Find("Leader"+enemy.tag); } function Update () { if...
View ArticleNullReferenceException on Photon Unity RPC Call
Hey guys, been trying to figure this out for way to long and it's starting to get me down. I'm working on a multiplayer game where the players can join at any time and take turns in stages. Here's what...
View ArticleObject Pool object reference is null?
Hey. So I'm new to the whole Unity thing and basically for a college assignment I have to assign a design pattern to my final year project. Since I'm doing a game in Unity I need to apply it to this. I...
View ArticleNeed Help With a NullReference Exception
Ok, I am following the unity 3D tutorials from the official website, however I coding my own stuff as I go rather than just copying the code from the videos. The ideas is the following. I have a script...
View ArticleDynamic KeyCode Unity Exception
Hi, I am trying to make a simple input manager using C# and I got stuck in the KeyCode thing, here is the code> if (Input.GetKeyDown ((KeyCode)Enum.Parse(typeof(KeyCode), _controls[2]) )) > {}...
View ArticleKeyCode parse problem
Hi I am trying to make a small/basic input manager using c# but I am having a bit of a problem, here is where the problem is> if (Input.GetKey ((KeyCode)System.Enum.Parse(typeof(KeyCode),...
View ArticleNullReferenceException question.
void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "bullet") { manager.SendMessage("Box",collider,SendMessageOptions.DontRequireReceiver); } } Console says collider is a null...
View ArticleError in winRt
Hello, I build my game for winRt and everything smooth, till a random moment the game decides to crash in this function: find = CurrentManager._levelBlocks.Find((obj) => { if (obj == null) return...
View ArticleUnity Crash - Access Violation (0xc0000005) error
My Unity application is crashing in unspecified moments and I have no idea where the error is. Unity Player [version: Unity 4.3.4f1_e444f76e01cd] Autocomp.Engine3D.exe caused an Access Violation...
View ArticleNullRefrenceException: Object reference not set to an instance of an object?
I get an error saying Object reference not set to an instance of an object Test..ctor () at (Assets/Test.js:4). What does it mean and how do I fix it? Here is my script... var damping:int=2; var...
View ArticleUnassigned Reference Exception error?
Hey. So I have managed to shoot a light from a wand in my game, it works okayish for now, however in the console I keep getting this error: UnassignedReferenceException: The variable projectile of...
View Article