Optimize performance for skin component properties.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Cryville.Common.Pdt;
|
||||
using Cryville.Common.Pdt;
|
||||
using Cryville.Crtr.Components;
|
||||
using Cryville.Crtr.Event;
|
||||
using System;
|
||||
@@ -35,7 +35,7 @@ namespace Cryville.Crtr {
|
||||
void MatchStatic(SkinElement rel, ContainerState context, Transform anchor = null) {
|
||||
ChartPlayer.etor.ContextTransform = anchor;
|
||||
foreach (var p in rel.properties) {
|
||||
if (p.Key.Name == null)
|
||||
if (p.Key.Name == 0)
|
||||
anchor.gameObject.AddComponent(p.Key.Component);
|
||||
else {
|
||||
ChartPlayer.etor.Evaluate(GetPropOp(anchor, p.Key).Operator, p.Value);
|
||||
@@ -82,7 +82,7 @@ namespace Cryville.Crtr {
|
||||
void MatchDynamic(SkinElement rel, ContainerState context, Transform anchor = null) {
|
||||
ChartPlayer.etor.ContextTransform = anchor;
|
||||
foreach (var p in rel.properties) {
|
||||
if (p.Key.Name == null)
|
||||
if (p.Key.Name == 0)
|
||||
throw new InvalidOperationException("Component creation in dynamic context is not allowed");
|
||||
var prop = GetPropOp(anchor, p.Key);
|
||||
if (context.CloneType > prop.UpdateCloneType) continue;
|
||||
|
Reference in New Issue
Block a user