Add Android to Platform Switch node
This commit is contained in:
committed by
Wojciech Figat
parent
dabae6a7ba
commit
3e50508adf
@@ -1229,9 +1229,9 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
Title = "Platform Switch",
|
||||
Description = "Gets the input value based on the runtime-platform type",
|
||||
Flags = NodeFlags.AllGraphs,
|
||||
Size = new Vector2(220, 150),
|
||||
Size = new Vector2(220, 160),
|
||||
ConnectionsHints = ConnectionsHint.Value,
|
||||
IndependentBoxes = new[] { 1, 2, 3, 4, 5, 6, 7 },
|
||||
IndependentBoxes = new[] { 1, 2, 3, 4, 5, 6, 7, 8 },
|
||||
DependentBoxes = new[] { 0 },
|
||||
Elements = new[]
|
||||
{
|
||||
@@ -1243,6 +1243,7 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
NodeElementArchetype.Factory.Input(4, "Linux", true, null, 5),
|
||||
NodeElementArchetype.Factory.Input(5, "PlayStation 4", true, null, 6),
|
||||
NodeElementArchetype.Factory.Input(6, "Xbox Scarlett", true, null, 7),
|
||||
NodeElementArchetype.Factory.Input(7, "Android", true, null, 8),
|
||||
}
|
||||
},
|
||||
new NodeArchetype
|
||||
|
||||
@@ -739,6 +739,7 @@ void ShaderGenerator::ProcessGroupTools(Box* box, Node* node, Value& value)
|
||||
PLATFORM_CASE(5, "PLATFORM_LINUX");
|
||||
PLATFORM_CASE(6, "PLATFORM_PS4");
|
||||
PLATFORM_CASE(7, "PLATFORM_XBOX_SCARLETT");
|
||||
PLATFORM_CASE(8, "PLATFORM_ANDROID");
|
||||
#undef PLATFORM_CASE
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -690,6 +690,9 @@ void VisjectExecutor::ProcessGroupTools(Box* box, Node* node, Value& value)
|
||||
case PlatformType::XboxScarlett:
|
||||
boxId = 7;
|
||||
break;
|
||||
case PlatformType::Android:
|
||||
boxId = 8;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
value = tryGetValue(node->GetBox(node->GetBox(boxId)->HasConnection() ? boxId : 1), Value::Zero);
|
||||
|
||||
Reference in New Issue
Block a user