Created
January 15, 2017 23:22
-
-
Save maxrevilo/68b83872226e6a174bdaa68d918d5f03 to your computer and use it in GitHub Desktop.
Class that serves as base class for any Unity3d's component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace Game.Core | |
{ | |
public class BaseComponent : MonoBehaviour | |
{ | |
protected virtual void Awake() { } | |
protected virtual void OnEnable() { } | |
protected virtual void Start() { } | |
protected virtual void OnApplicationPause() { } | |
protected virtual void Update() { } | |
protected virtual void FixedUpdate() { } | |
protected virtual void LateUpdate() { } | |
protected virtual void OnDisable() { } | |
protected virtual void OnApplicationQuit() { } | |
protected virtual void OnDestroy() { } | |
protected virtual void DontDestroyOnLoad() | |
{ | |
Object.DontDestroyOnLoad(gameObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment