Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Mytts · Feb 07, 2018 at 08:35 AM · scriptableobjectfreezecompile

scriptable objects slow down the editor

We have an issue with scriptable objects slowing down the editor massively. They are only used as data containers and as such has no actual logic in them. The thing is that the c# script doesn't cause any issues, it's only the instances of the scribtable objects that does. If we delete all instances (Roughly 80), the editor runs fine again.

The slow downs that it causes: Without the scriptable objects, the compile time is 20 seconds, with them it is 50 seconds. They add consistentlty 30 seconds of compile time. (This is not the main issue). Without the scriptable objects, unity is rather responsive, with the scriptable object whenever unity loses focus and regains it, it is frozen for 6-10 seconds. This is the main issue. I'm a little uncertain if the scriptable objects causes it or if the compile time does.

Does anyone know why this might happen?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by yetyman · Jul 19, 2019 at 11:11 PM

hello,

A bit of a late reply, but you said it slows down the editor, do you mean it slows down usage of the editor or that it slows down debugging?

if it slows down debugging on start, that's because all of the Scriptable objects need to be read in from the harddrive. if i have my facts straight on Scriptable Objects, one of the big features is that they automatically handle serializing and saving themselves. that means they exist in some way as files on the harddrive. Accessing them for the first time will require harddrive reading.


if its used in say... a gizmo, that will be more severe as i believe unity will attempt to read the scriptable object from the harddrive each time it tries to access it while the game isnt playing. to fix this, you can cache the scriptable object in your gizmo class and it should stay in memory.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dragonarkon · Nov 07, 2019 at 10:22 AM 0
Share

That makes a lot of sense. Thanks for the explanation! It is just a shame, we are using a bunch of different scriptable objects as well and it is frustrating having to wait an extra 30sec everytime you swap in that scene or that folder it really slows down dev time.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

79 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Ability System with ScriptableObject 1 Answer

Scriptable Object only useable from code, not via inspector 1 Answer

Why do I need to serialize a struct inside a ScriptableObject to save its data? 1 Answer

Make the same serialized class as a ScriptableObject? 1 Answer

How To Freeze An Object Motion? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges