https://metaplay.io logo
Interfaces in game configs
# questions-and-feedback
a
I want to have common bases like IJob and IScene for my game configs, but somehow I can't use FooSceneInfo or BarSceneInfo exclusively although they are implementing IScene. Is there any way to circumvent the need for MetaRef IJob.Scene => new(Scene.Ref) since it creates an instance whenever it is accessed? https://pastebin.com/U7Q26Svj
n
Is it an option to have simply
IScene Scene { get; }
in the base
IJob
, implemented as
IScene IJob.Scene => Scene.Ref
? In case
MetaRef
isn't actually needed for the
IJob.Scene
base property.
a
oh id did not even think about that.. i think we can make it work like that, thanks for the insights!