From 35613542312d9f6eef545cb095df174ea10da1ee Mon Sep 17 00:00:00 2001 From: PopSlime Date: Sun, 26 Feb 2023 16:21:33 +0800 Subject: [PATCH] Implement execute once annotation on properties. --- Assets/Cryville/Crtr/SkinContainer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/Cryville/Crtr/SkinContainer.cs b/Assets/Cryville/Crtr/SkinContainer.cs index 064ba8a..7514145 100644 --- a/Assets/Cryville/Crtr/SkinContainer.cs +++ b/Assets/Cryville/Crtr/SkinContainer.cs @@ -79,6 +79,9 @@ namespace Cryville.Crtr { for (int i = 0; i < stack.Properties.Count; i++) { DynamicProperty p = stack.Properties[i]; p.Key.ExecuteDynamic(_group, p.Context, p.Value, dl); + if (p.Key.annotations.Contains("once")) { + stack.Properties.RemoveAt(i--); + } } for (int i = 0; i < stack.Elements.Count; i++) { DynamicElement e = stack.Elements[i];