Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Soxbear · Aug 19, 2020 at 09:40 PM · solution

[Solved] Update function didn't work

For some reason the script I was trying to access was disabled. Now it works. :/

Comment
Add comment · Show 2
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 Soxbear · Aug 19, 2020 at 09:53 PM 0
Share

Probably worth noting that all of the values are set to what you think they would be.

avatar image Hellium · Aug 19, 2020 at 11:07 PM 0
Share

Notice you have errors in the console as well.

Your script most likely throws an exception before Debug.Log("Is Updating"); is called

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by The_Three_Vs · Aug 19, 2020 at 10:09 PM

Is the script PathLagReducer or the GameObject it's attached to disabled at any time? Update won't call unless the GameObject is active and PathLagReducer is enabled.

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 Soxbear · Aug 19, 2020 at 10:29 PM 0
Share

They are never disabled

avatar image
0

Answer by Glurth · Aug 19, 2020 at 11:19 PM

I notice there are errors hidden in the console. I would suspect one of these in an exception thrown in your Update() function, BEFORE it gets to any of your Debug.Log commands (this would prevent the rest of the function from executing). To test this, you can put another debug log at the very top of the function, and see if that one is visible. I'd also make sure to get rid of all those error messages, or ensure only those which can be safely ignored are showing up. OOPS! Helium said this as a comment 12min ago- sorry Helium!!

Comment
Add comment · Show 9 · 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 Soxbear · Aug 20, 2020 at 01:31 AM 0
Share

alt text

None of them are related to that script

capture.png (144.6 kB)
avatar image Hellium Soxbear · Aug 20, 2020 at 07:31 AM 2
Share

$$anonymous$$aybe, but if the AIPath class throws an error when you change the repathRate || canSearch, the exception "bubbles" up to this script and stops it's execution.

avatar image Insok Soxbear · Aug 20, 2020 at 02:04 PM 0
Share

Yep, those errors are most likely the problem. Unity stops the scripts if there are certain errors.

avatar image Soxbear · Aug 20, 2020 at 03:20 PM 0
Share

As I said, none of the errors are related to the PathLagReducer script or AIPath script. They all come from AIBase, which is an Astar script and all existed before this script. They won't be part of the problem.

avatar image Glurth Soxbear · Aug 20, 2020 at 03:43 PM 0
Share

This error does NOT imply a coding error exists in the AIBase script, it implies that it's data is not configured properly- a reference that should be provided is missing. We simply don't know enough about your project to assume that AIPath does not depend on / use AIBase, based on the names.. I'd suspect it does. Anyway.. what happened when you put a debug.log at the TOP of Update- do you see it display?

avatar image Soxbear Glurth · Aug 20, 2020 at 05:13 PM 0
Share

We know these errors are unrelated because they existed before this script existed. Also, moving the Debug.Log to the top worked.

Show more comments
avatar image Soxbear · Aug 20, 2020 at 03:23 PM 0
Share

Also should mention we know that errors aren't stopping the scripts execution, because the start function still does what it is supposed to.

avatar image Hellium Soxbear · Aug 20, 2020 at 05:15 PM 0
Share

But in the Start method, you aren't calling the AIPath.repathRate.

You should take some time to learn how exceptions work.

avatar image
0

Answer by Soxbear · Aug 20, 2020 at 06:05 PM

The script I was trying to access was disabled without me noticing. Thanks for your help. @Glurth @Hellium @Insok @The_Three_Vs

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

227 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 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 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

Multiplying Integer value to transform.localScaleY position 1 Answer

Duplicated terrain gets affected by old terrain? [Unity 5] 1 Answer

My 2d game jump only one time 1 Answer

Import UnityPackage creates issues with Mono Solution 1 Answer

Visual Studio + Analyzers 1 Answer


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