コード例 #1
0
 /// <a href="http://bit.ly/2Rlzvru">Set a bool field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref bool field, bool from)
 {
     asset.Set <bool>(ref field, from);
 }
コード例 #2
0
 /// <a href="http://bit.ly/2Rlzvru">Set a float string inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref string field, string from)
 {
     asset.Set <string>(ref field, from);
 }
コード例 #3
0
 /// <a href="http://bit.ly/2Rlzvru">Set a long field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref long field, long from)
 {
     asset.Set <long>(ref field, from);
 }
コード例 #4
0
 /// <a href="http://bit.ly/2Rlzvru">Set a int field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref int field, int from)
 {
     asset.Set <int>(ref field, from);
 }
コード例 #5
0
 /// <a href="http://bit.ly/2Rlzvru">Set a double field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref double field, double from) =>
 asset.Set(ref field, from, Compare.AlmostEqual);
コード例 #6
0
 /// <a href="http://bit.ly/2Rlzvru">Set a Quaternion inside a CustomAsset compound object. It checks for read/write and that the field is approximately different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref Quaternion field, Quaternion from) =>
 asset.Set(ref field, from, (a, b) => a == b);
コード例 #7
0
 /// <a href="http://bit.ly/2Rlzvru">Set a Vector4 inside a CustomAsset compound object. It checks for read/write and that the field is approximately different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref Vector4 field, Vector4 from) =>
 asset.Set(ref field, from, (a, b) => a == b);