Optimize performance for skin component properties.
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
public struct SkinPropertyKey {
|
||||
public Type Component;
|
||||
public string Name;
|
||||
public int Name;
|
||||
}
|
||||
public class SkinElementBinder : EmptyBinder {
|
||||
public override object ChangeType(object value, Type type, CultureInfo culture) {
|
||||
@@ -81,9 +81,9 @@ namespace Cryville.Crtr {
|
||||
if (key[0] == '*')
|
||||
return new SkinPropertyKey { Component = GetComponentByName(key.Substring(1)) };
|
||||
else
|
||||
return new SkinPropertyKey { Component = typeof(TransformInterface), Name = key };
|
||||
return new SkinPropertyKey { Component = typeof(TransformInterface), Name = IdentifierManager.SharedInstance.Request(key) };
|
||||
case 2:
|
||||
return new SkinPropertyKey { Component = GetComponentByName(cp[0]), Name = cp[1] };
|
||||
return new SkinPropertyKey { Component = GetComponentByName(cp[0]), Name = IdentifierManager.SharedInstance.Request(cp[1]) };
|
||||
}
|
||||
}
|
||||
return base.ChangeType(value, type, culture);
|
||||
|
Reference in New Issue
Block a user