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
Comments (1)
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
- Animation Parameters example code uses legacy Input System causing “InvalidOperationException” errors spam in the Console window
- Overlay cameras break URP rendering order on Mac/Metal
- Spring Joint 2D "Distance" value adjusts "Connected Anchor" Y value instead when dragging via Inspector
- Tree GameObject appears grey when rotated in the Preview window
- Unable to delete Tree GameObjects and “NullReferenceException” errors are thrown when using Hierarchy V2 and trying to open the GameObject context menu after deleting a Tree Prefab
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++;
}
}