Scriptableobject after local serialization restarts unity and reports the associated script can not be loaded. Fix any compile errors and assign a valid script pit

Source: Internet
Author: User

Step on the Pit

Do the editor some settings serialization exists locally when the class inheriting from Scriptableobject passes

The created asset file.

After restarting unity, look at this asset and discover that all of the serialized attributes above are missing, and the report's error is

Find the answer after finding a website that doesn't exist

A scriptableobject that needs to be serialized locally must have its own entity script file with the same name.

That is, the class name that can be found in the SCIPT option. cs file

Unity seems to find the script file based on the serialized class name, recheck the script's serializable entries, and then deserialize the serializable option again.

That's the problem, just create a new data class with the same name CS file, and then move the code over

Test--

Problem solving

Scriptableobject after local serialization restarts unity and reports the associated script can not be loaded. Fix any compile errors and assign a valid script pit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.