Fix wrong context access in component creation.
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
public override bool IsValueRequired { get { return false; } }
|
public override bool IsValueRequired { get { return false; } }
|
||||||
public override void ExecuteStatic(ContainerState state, RuntimeSkinContext ctx, PdtExpression exp) {
|
public override void ExecuteStatic(ContainerState state, RuntimeSkinContext ctx, PdtExpression exp) {
|
||||||
ctx.ReadContext.Transform.gameObject.AddComponent(Component);
|
ctx.WriteTransform.gameObject.AddComponent(Component);
|
||||||
}
|
}
|
||||||
public override void ExecuteDynamic(ContainerState state, RuntimeSkinContext ctx, PdtExpression exp) {
|
public override void ExecuteDynamic(ContainerState state, RuntimeSkinContext ctx, PdtExpression exp) {
|
||||||
throw new InvalidOperationException("Component creation in dynamic context is not allowed");
|
throw new InvalidOperationException("Component creation in dynamic context is not allowed");
|
||||||
|
Reference in New Issue
Block a user