// Subscribe to monobehavior Update and pass to active state. protected virtual void Update() { // Tick the current game screen if it exists. if (currentScreen != null) { currentScreen.OnUpdateState(); } // Update the resource loaded. AsyncResourceLoader.Update(); }
public BackgroundResourceLoader(AsyncResourceLoader loader, Action successCallback) { m_loader = loader; BackgroundTask = Task.Run(() => loader.Load()); SuccessCallback = successCallback; }