Search Issue Tracker

By Design

Votes

0

Found in

5.4.0b17

Issue ID

792613

Regression

Yes

[Upgrade] Zone Controller Pro package contains "LoadAssetAtPath is not allowed to be called from a ScriptableObject constructor

Serialization

-

[Upgrade] Zone Controller Pro package contains "LoadAssetAtPath is not allowed to be called from a ScriptableObject constructor"

1. What happened
In Zone Control Pro package lots of errors in the package on "LoadAssetAtPath is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead."
Package needs updating for 5.4.

2. How we can reproduce it using the example you attached

1. Import " Zone Controller Pro" package.
2. Open Cimenatic scene (UtopiaWorx -> Zone Controller Pro -> Demo Content -> Scenes).
3. Press Play.
4. In Hierarchy expand Canvas -> (e.g.) Lightning area -> Select New Zone.

Actual result:
In 5.4.0b17 (see screenshot attached):

LoadAssetAtPath is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'ZoneMasterControllerEditor'.
See "Script Serialization" page in the Unity Manual for further details.
UnityEditor.EditorGUIUtility:Load(String)
ZoneMasterControllerEditor:.ctor()

In 5.4.0b4:

LoadAssetAtPath is not allowed to be called from a MonoBehaviour constructor, call it in Awake or Start instead. Called from script 'ZoneControllerEditor' on game object ''.
See "Script Serialization" page in the Unity Manual for further details.
UnityEditor.EditorGUIUtility:Load(String)
ZoneControllerEditor:.ctor()

In 5.3.4f1 (see screenshot attached): No errors.

Expected results: No errors in logs.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.