Search Issue Tracker
Duplicate
Votes
1
Found in
5.3.2f1
Issue ID
766643
Regression
No
Resources.Load returns null when loading same game object in another scene on standalone player
Steps to reproduce:
1. Open attached project
2. Open Build settings
3. Build for windows standalone with Developement build and Script debugging enabled
4 Press Play! button. Then standalone player will load Bug scene. Bug scene calls Resources.Load<GameObject>("Chobie").
5. Press PRESS button. This will load Bug2 scene asynchronously. Bug2 scene also calls Resources.Load<GameObject>("Chobie") but this will fail (notice exceptions in console)
Note: Everything works as expected in editor.
Reproduced with: 5.3.2f1, 5.3.2p1, 5.4.0b4
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
jordenson
Feb 02, 2016 07:22
Just out of interest, have you tried basic file access with 5.3.2f1, 5.3.2p1? I found file stream failed to read altogether with this latest version. Even something basic like File.ReadAllBytes(file_name) failed to load the data correctly. Previous versions the loading code was fine, but particles were broken... Some test code if curious (works fine in Editor, fails on 64bit iOS device):
void Update () {
string file_name = string.Format("{0}{1}test.txt", Application.persistentDataPath, Path.DirectorySeparatorChar);
if (counter == 0)
{
Debug.Log( "Writing file " + file_name );
byte[] data = new byte[10];
data[0] = 23;
Debug.Log( data[0] );
File.WriteAllBytes( file_name, data );
Debug.Log( "Writing file done" );
counter++;
}
else if (counter == 1)
{
Debug.Log( "Reading file " + file_name );
Debug.Log( File.Exists( file_name ) ? "File exists" : "File does not exist" );
byte[] readData = File.ReadAllBytes( file_name );
Debug.Log( readData[0] );
Debug.Log( "Reading file done" );
counter++;
}
}