public interface IScene<A> { public void Init(A args);}class MyType : IScene<string> { public void Init(string args) { ... }}...public T Spawn<T, A>(PackedScene scene, A args) where T : class, IScene<A> { T t = scene.Instantiate<T>(); t.Init(args); return t;}...MyType myType = Spawn<MyType>(scene, "hi"); // compiler complains about omitting type of A here