Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

how use update function in custom editor

Discussion in 'General Discussion' started by dahiyabunty1, May 21, 2020.

  1. dahiyabunty1

    dahiyabunty1

    Joined:
    Jan 22, 2020
    Posts:
    18
    pls give neat and clean code
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    7,691
  3. dahiyabunty1

    dahiyabunty1

    Joined:
    Jan 22, 2020
    Posts:
    18
    not worked..
     
  4. dahiyabunty1

    dahiyabunty1

    Joined:
    Jan 22, 2020
    Posts:
    18
    negnifity... can u tell me in which situation editor scriptting is very useful
     
  5. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,849
    dahiyabunty1 likes this.
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    7,691
    The manual page I linked has an example.

    In edit mode Update() is not called continuously, even if you use ExecuteInEditMode, only when something changes in the viewport. Additionally, coroutines are disabled. In this scenario, typically you put your initialization code into OnEnable, and your deinitialization code into OnDisable. Those functions will be called often.
     
    dahiyabunty1 likes this.
  7. dahiyabunty1

    dahiyabunty1

    Joined:
    Jan 22, 2020
    Posts:
    18
    thank... but if any solution...
    Code (CSharp):
    1. void update()
    2. {
    3. move player per frame
    4. }
     
unityunity