Search Unity

c# Extending monobehaviour

Discussion in 'Scripting' started by aubergine, May 30, 2011.

  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    How would i extend monobehaviour with a function which is called every frame and how would i use this function in all my other objects?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you would write an extended class MonoBehaviourEx, add it there and then make all your classes extend that one and call the function in your update if you need it