using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; using Sirenix.OdinInspector; using UnityEngine.UIElements; namespace BITKit { public abstract class BITBehavior : SerializedMonoBehaviour, ICustomInspector { public VisualTreeAsset customTreeAsset; public virtual void OnAwake() { } public virtual void OnStart() { } public virtual void OnStop() { } public virtual void OnUpdate(float deltaTime) { } public virtual void OnFixedUpdate(float deltaTime) { } public virtual void OnLateUpdate(float deltaTime) { } public virtual void OnDestroyComponent() { } public virtual void SetActive(bool active) { } public virtual Transform GetTransform() => transform; public void Toggle() { enabled = !enabled; } public virtual string GetName() { return gameObject.name; } public virtual object GetDiagnostics() { throw new System.NotImplementedException(); } public VisualElement GetVisualElement() { return customTreeAsset ? customTreeAsset.CloneTree() : null; } } }