Search Issue Tracker
Won't Fix
Votes
4
Found in
5.5.0f3
Issue ID
860560
Regression
Yes
FindGameObjectWithTag throws NullReferenceException in the Build mode
To reproduce:
1. Open attached project;
2. Run the project in the Play Mode;
3. Build and run the project on PC, Mac & Standalone platform;
4. Notice that only one card appears.
Expected result: no NullReferenceException is in the build mode.
Actual result: NullReferenceException: Object reference not set to an instance of an object at solitaireBlitzBoardManager.InstantiateCards () [0x00075] in C:\Users\viliu\Desktop\case_860560-_SolitaireBlitz\Assets\wrongPlanet.com\Scripts\managers\solitaireBlitzBoardManager.cs:334
NullReferenceException: Object reference not set to an instance of an object at solitaireBlitzBoardManager.Start () [0x00002] in C:\Users\viliu\Desktop\case_860560-_SolitaireBlitz\Assets\wrongPlanet.com\Scripts\managers\solitaireBlitzBoardManager.cs:121
Reproduced on: 5.5.0p3; 5.6.0b3
Not reproduced: 5.4.3f1; 5.3.6f1; 5.2.4f1
Note: When in the solitaireBlitzBoardmanager script line - 40 is commented and the play mode in editor is entered, console throws the same NullReferenceException like in the Build mode.
Note: photos attached.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Any small change in UI Builder Inspector refreshes Editor Inspector
- Inaccurate Box Collider boundaries on a rotated child Cube when the parent GameObject Scale is non-uniform
- [Android] "SHADOWS_SCREEN" set as shader Keyword when no "_ShadowMapTexture" is bound leads to freeze on a build on some Mali GPU devices
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- Global Scenes are not included in the Build when building multiple Build Profiles at the same time
smallUser
Feb 18, 2017 01:23
NullReferenceException: Object reference not set to an instance of an object
void Start () {
targetPlayer = GameObject.FindGameObjectWithTag("player1Target").transform;
}
smallUser
Feb 18, 2017 01:19
This is happen also in android device.
Environment:
Mac OS Sierra 10.12.2
Android version 5.1
Unity Version 5.5.1p4
License Type:Unity Pro, Team License, Android Pro, Windows Store Pro, Tizen Pro, Samsung TV Pro