Skip to content

Extensions for Editor

Home Forums Developer Concurrency Kit Extensions for Editor

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #540
    George Rolfe
    Member

    I’d like to use Tasks in an Editor/Inspector, but currently the extensions expect a MonoBehaviour. Could you make overloads for the Editor?

    My particular use case is writing a texture to disk, and then AssetDatabase.Import(path) when its done.

    #541
    Administrator
    Keymaster

    Hi George, I think this ought to work even in the editor, just be careful to manage your instances.

    static MonoBehaviour CreateBehaviour()
    {
      GameObject go = new GameObject("EditorBehaviour");
      GameObject.DontDestroyOnLoad(go);
      go.hideFlags = HideFlags.HideAndDontSave;
      return go.AddComponent<MonoBehaviour>();
    }
    
    #542
    Administrator
    Keymaster

    George, I added some new members in v1.0.3 which I just submitted that should help with this. When it goes live, check out:

    • ConcurrentBehaviour.SharedInstance
    • UnityFiberScheduler.SharedInstance
    • UnityTaskScheduler
    • UnityTaskFactory

    Thanks for the feedback!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed.