Timming issue with API initialization

The API is not remaining initialized when setting the controller

 public class DemoPlugin : ITranslatablePlugin
    {
        public void SetController(ITranslatablePluginController controller)
        {
            var permissions = Apis.Get<IPermissions>();

            if (permissions != null)
            {
                 System.Diagnostics.Debug.WriteLine("SetController permissions not null"); // Initialize permissions
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("SetController permissions is null");
            }
        }

        public void Initialize()
        {
            
        }

        public Translation[] DefaultTranslations => new Translation[0];

        public string Name => "Demo Plugin";

        public string Description => "API Initialization Test Plugin";
    }

SetController permissions is null
SetController permissions is null
SetController permissions not null
SetController permissions is null
SetController permissions not null

To clarify we don't normally do things in the SetController methods, can't speak for anyone else though. I will probably work around it, but I am surprised that the API can come and go, but maybe this is how it always was.



little bit more
[edited by: Robert Nash at 11:52 AM (GMT 0) on Fri, Jul 17 2026]