Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using Sirenix.OdinInspector;
- using UnityEditor;
- using UnityEngine;
- public class TestSO : ScriptableObject
- {
- void OnEnable()
- {
- EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
- OnInit();
- }
- void OnPlayModeStateChanged(PlayModeStateChange _)
- {
- OnInit();
- }
- void OnInit()
- {
- // Init stuff..
- }
- void OnDisable()
- {
- EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment