Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class BindTypeNameToTypeAttribute : Attribute, _Attribute
[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName", typeof(Namespace.NewTypeName))]
//[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName, OldFullAssemblyName", typeof(Namespace.NewTypeName))]
namespace Namespace
{
public class SomeComponent : SerializedMonoBehaviour
{
public IInterface test; // Contains an instance of OldTypeName;
}
public interface IInterface { }
public class NewTypeName : IInterface { }
//public class OldTypeName : IInterface { }
}
public BindTypeNameToTypeAttribute(string oldFullTypeName, Type newType)
System.String | oldFullTypeName | Old old full type name. If it's moved to new a new assembly you must specify the old assembly name as well. See example code in the documentation. |
System.Type | newType | The new type. |