• 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
0
Question by Herchey · Oct 09, 2018 at 10:26 PM · compilercompile

Long compile time, large amount of objects, very few scripts

Currently my compile time after making a script change is over 10 seconds, and this obviously gets old pretty quick. I'll try to make my situation so far clear since it's been a fair bit of time and looking around.

  • It is only this project. Another project of mine does not have this issue.

  • There is currently only about 10 total scripts in the entire project.

  • When built, the game itself runs fine. No current issues there.

  • My major thought currently is the amount of objects in the scene. Currently ~650 on both of two GameObjects, one of which is usually disabled. Basically all of them are TextMesh Pro objects. I would preferably like to cut down on this number, but a fair portion of these will be changeable numerical fields, so at least those will have to stay. In the end I may be able to remove half or so since they're just labels that I can probably just edit into the background image, but not for now.

  • Another option is that a large portion of these fields are referred to by other scripts. Each stat (Strength, Intelligence, etc etc) generally has 3-5 fields (total, modifiers, adjustments) which also all refer to a relevant text field. I did some reading on garbage collection and I did notice that references can add calls to GC, which definitely shows (I'll add the profiler information below). Each stat is currently its own class, usually just with a few variables/properties, and a matching set of references to text fields. The character itself then has a set of these classes, currently sitting at about 50 or so, with a small amount more still possibly needed later, as well as 20-30 variables.

  • My last thought is that most of the classes in the main character script are Serializable so I can keep an eye on them during testing. Unfortunately, I haven't quite grasped the concept of Serialization outside of it just showing in the inspector. I don't need a breakdown of it now (I can figure it out on my own time), but I would at least like to know if that's an issue.

I did a Deep Profile/Profile Editor during compile time and what I believe to be the relevant portions are below:

alt text

alt text

I can post more if needed, but that's basically everything that seemed to be taking a relevant amount of time. Any advice on what's causing this large of a compile time would be appreciated so I can work on cutting those aspects down.....or if I'm just stuck with it. Thanks.

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

90 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do you have the editor compile script in background. 2 Answers

Disabling auto-refresh not working 0 Answers

Temp Project Folder In Ramdisk Error 0 Answers

Moving file failed 0 Answers

Compiler error - how to fix it? 0 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