Add Array constant node to Visual Script and Anim Graph
This commit is contained in:
@@ -62,14 +62,15 @@ namespace FlaxEditor.Surface.Elements
|
||||
/// </summary>
|
||||
/// <param name="parentNode">The parent node.</param>
|
||||
/// <param name="arch">The node element archetype.</param>
|
||||
/// <param name="customValue">The custom value override (optional).</param>
|
||||
/// <returns>The result value.</returns>
|
||||
public static float Get(SurfaceNode parentNode, NodeElementArchetype arch)
|
||||
public static float Get(SurfaceNode parentNode, NodeElementArchetype arch, object customValue = null)
|
||||
{
|
||||
if (arch.ValueIndex < 0)
|
||||
if (arch.ValueIndex < 0 && customValue == null)
|
||||
return 0;
|
||||
|
||||
float result;
|
||||
var value = parentNode.Values[arch.ValueIndex];
|
||||
var value = customValue ?? parentNode.Values[arch.ValueIndex];
|
||||
|
||||
// Note: this value box may edit on component of the vector like Vector3.Y, BoxID from Archetype tells which component pick
|
||||
|
||||
|
||||
Reference in New Issue
Block a user