InterfaceContainer<TContainedType>
This type exists to allow connecting up interfaces into objects via the inspector.
public class InterfaceContainer<TContainedType> : ISerializationCallbackReceiver where TContainedType : class
Inherits from ISerializationCallbackReceiver
Type Parameters
TContainedTypeThe interface type to be contained, it must be a unity object.
This is a convenience mechanism because there is no practical way to serialise an interface in Unity.
Your interfaces do still need to be something that is a subclass of
UnityEngine.Object for it to be serialisable using this wrapper.
Essentially this is just a wrapper around a monobehaviour but allows you to think only in the terms of the interface.
Which is generally more useful and helpful.#Fields
#targetObject
public UnityEngine.Object? targetObject;Type Nullable
#Properties
#Interface
public TContainedType? Interface { get; }Type TContainedType
#Methods
#OnAfterDeserialize()
public void OnAfterDeserialize()#OnBeforeSerialize()
public void OnBeforeSerialize()Generated from Yarn Spinner for Unity 3.3.