Skip to content

Instantiating Objects with interface #60

@sima995

Description

@sima995

Is your feature request related to a problem? Please describe.
Referencing UnityEngine.Object with a specific interface is great, but then trying to instantiating them is unsafe. A cast is required at some point.

Describe the solution you'd like
A reference type where only classes of type UnityEngine.Object are allowed. Getting the value of that reference would always return that type so Instantiate(referencedPrefab.Value) would work straight away.

Maybe an extension method that instantiates the Object and returns the interface?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions