Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by domportera · Mar 18, 2017 at 08:31 AM · performanceprofilerperformance optimizationbehaviour

BehaviourUpdate taking unreasonable amounts of resources in the profiler

I'm getting issues with performance in the BehaviourUpdate portion of the profiler, but all of its sub-components do not add nearly to the amount of time BehaviourUpdate is taking. I've disabled V-Sync. What's going on here?

See the image attached to see what I mean.

I have very few scripts running in my scene. Only an extended first person controller and a simple compass. alt text

behaviourupdate.png (94.9 kB)
Comment
Add comment · Show 5
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 Bunny83 · Mar 20, 2017 at 02:15 AM 1
Share

Are you sure that you don't get any errors in your console? The StackTraceUtility is usually only used when there is either an error or when you manually use Debug.Log every frame.

Try a deep-profile. Note that deep profiling itself adds quite a few overhead but it might help to figure out the cause.

avatar image RobAnthem · Mar 20, 2017 at 02:41 AM 1
Share

Jeeze that is definitely ridiculous, I was just reviewing my profiler and was sitting at 123b for about 120 active objects with complex scripts. As bunny said, this is definitely from errors, your stacktrace is through the roof.

avatar image domportera · Mar 20, 2017 at 03:18 AM 0
Share

On runtime I'm getting the error:

 ArgumentException: Input Axis Gamepad Look X is not setup.
  To change the input settings use: Edit -> Project Settings -> Input
 UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetAxis (System.String name, Boolean raw) (at Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs:10)
 UnityStandardAssets.CrossPlatformInput.CrossPlatformInput$$anonymous$$anager.GetAxis (System.String name, Boolean raw) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInput$$anonymous$$anager.cs:108)
 UnityStandardAssets.CrossPlatformInput.CrossPlatformInput$$anonymous$$anager.GetAxis (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInput$$anonymous$$anager.cs:95)
 UnityStandardAssets.Characters.FirstPerson.$$anonymous$$ouseLook.LookRotation (UnityEngine.Transform character, UnityEngine.Transform camera) (at Assets/FirstPersonExploration$$anonymous$$it/Standard Assets/Characters/FirstPersonCharacter/Scripts/$$anonymous$$ouseLook.cs:45)
 UnityStandardAssets.Characters.FirstPerson.FirstPersonController.RotateView () (at Assets/FirstPersonExploration$$anonymous$$it/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs:257)
 UnityStandardAssets.Characters.FirstPerson.FirstPersonController.Update () (at Assets/FirstPersonExploration$$anonymous$$it/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs:72)
 

I pursue this and a line in question is

 public override float GetAxis(string name, bool raw)
         {
            return raw ? Input.GetAxisRaw(name) : Input.GetAxis(name);
         }


The error could be in the First Person Exploration $$anonymous$$it from the asset store, in which case the lines in question are:

 yRot = CrossPlatformInput$$anonymous$$anager.GetAxis("Gamepad Look X")*XSensitivity;

 gameObject.GetComponent<$$anonymous$$ouseLook>().LookRotation(transform, m_Camera.transform);

I'm not sure what the problem with this would be, though. I've pursued all of the lines mentioned in the error report, and nowhere does it explicitly state the format of the Look X string. In other threads I've seen it's often just a matter of writing "Horizontal" in the correct format, but I can't find any hard-coded strings. How could I fix this?

Also, I ran the deep profiler and found this:

alt text

deep-profile.png (77.1 kB)
avatar image RobAnthem domportera · Mar 20, 2017 at 03:21 AM 1
Share

Yeah, go to Edit > Project Settings > Input, and add the missing axis.

avatar image domportera RobAnthem · Mar 20, 2017 at 04:03 AM 0
Share

It took me a while to realize that I had to make my own custom axis to make this work, rather than editing the "Horizontal" axes.

Performance is back up to speed, thank you so much! I'd love to give you reputation if you want to post it as an answer

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by RobAnthem · Mar 20, 2017 at 04:06 AM

If anyone has this issue in the future.

Go to Edit > Project Settings > Input

And add the appropriate axis, to increase the size of inputs, resize the array to be 1 larger, or click on any element and press CTRL + D.

Then change the name of the new axis to reflect that of the one being requested. In this case, it is "Gamepad Look X"

Comment
Add comment · 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

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

6 People are following this question.

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

Related Questions

Reading Profiler Results 1 Answer

Question regarding TileMap Performance 0 Answers

Problem with profiler spikes caused by Semaphore.WaitForSignal 0 Answers

Figuring out which specific objects are slow to render? 0 Answers

performance issue on android devices unity 2018.1.1f1 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