Quantcast
Channel: Questions in topic: "exception"
Browsing all 470 articles
Browse latest View live
↧

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 Article


Is 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 Article


GameObject 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 Article

GetComponent 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 Article

Unity 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 Article


NullRefernceExcepception 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 Article

Null 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 Article

ArrayTypeMismatchException: 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 Article


Stylecop 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 Article


NullReferenceException 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 Article

NullReferenceException 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 Article

Object 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 Article

Need 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 Article


Dynamic 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 Article

KeyCode 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 Article


NullReferenceException question.

void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "bullet") { manager.SendMessage("Box",collider,SendMessageOptions.DontRequireReceiver); } } Console says collider is a null...

View Article

Error 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 Article


Unity 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 Article

NullRefrenceException: 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 Article

Unassigned 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
Browsing all 470 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>