public static void Start(GameObject go, Action<string, float> _onProgress, Action _onFinish) { if (_inst == null) { _inst = go.AddComponent<AssetPreloader>(); _inst.onProgress = _onProgress; _inst.onFinish = _onFinish; } }
void OnDestroy() { _inst = null; }