Search Issue Tracker
Script Import Settings ignored when component added from another script
- Create a script, e.g. TestScript, with public field of type GameObject.
- Open "Script Import Settings" and set some prefab to this property.
- Create another, which will add a component TestScript (gameObject.AddComponent<TestScript>();) and attach it to a game object in the hierarchy
- Hit play
Actual: The component is created, the public field is null;
Expected: Public field is initialized with prefab, that was set in Script Import Settings. The behaviour is the same when attaching TestScipt component manually, by dragging over a game object.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The Vector Graphics package can't be found in the Package Manager even if preview packages are enabled
- Hyphen symbol is not allowed inside the InputField if its content type is set to Name
- [2D Game kit] "Import parameters got modified during import" error is thrown when opening up the project for the first time
- Building subscenes without platform package doesn't work
- Picking stacked objects always selects prefab