Add Android to Platform Switch node

This commit is contained in:
Wojciech Figat
2020-12-14 12:38:35 +01:00
committed by Wojciech Figat
parent dabae6a7ba
commit 3e50508adf
3 changed files with 7 additions and 2 deletions

View File

@@ -1229,9 +1229,9 @@ namespace FlaxEditor.Surface.Archetypes
Title = "Platform Switch", Title = "Platform Switch",
Description = "Gets the input value based on the runtime-platform type", Description = "Gets the input value based on the runtime-platform type",
Flags = NodeFlags.AllGraphs, Flags = NodeFlags.AllGraphs,
Size = new Vector2(220, 150), Size = new Vector2(220, 160),
ConnectionsHints = ConnectionsHint.Value, 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 }, DependentBoxes = new[] { 0 },
Elements = new[] Elements = new[]
{ {
@@ -1243,6 +1243,7 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.Input(4, "Linux", true, null, 5), NodeElementArchetype.Factory.Input(4, "Linux", true, null, 5),
NodeElementArchetype.Factory.Input(5, "PlayStation 4", true, null, 6), NodeElementArchetype.Factory.Input(5, "PlayStation 4", true, null, 6),
NodeElementArchetype.Factory.Input(6, "Xbox Scarlett", true, null, 7), NodeElementArchetype.Factory.Input(6, "Xbox Scarlett", true, null, 7),
NodeElementArchetype.Factory.Input(7, "Android", true, null, 8),
} }
}, },
new NodeArchetype new NodeArchetype

View File

@@ -739,6 +739,7 @@ void ShaderGenerator::ProcessGroupTools(Box* box, Node* node, Value& value)
PLATFORM_CASE(5, "PLATFORM_LINUX"); PLATFORM_CASE(5, "PLATFORM_LINUX");
PLATFORM_CASE(6, "PLATFORM_PS4"); PLATFORM_CASE(6, "PLATFORM_PS4");
PLATFORM_CASE(7, "PLATFORM_XBOX_SCARLETT"); PLATFORM_CASE(7, "PLATFORM_XBOX_SCARLETT");
PLATFORM_CASE(8, "PLATFORM_ANDROID");
#undef PLATFORM_CASE #undef PLATFORM_CASE
break; break;
} }

View File

@@ -690,6 +690,9 @@ void VisjectExecutor::ProcessGroupTools(Box* box, Node* node, Value& value)
case PlatformType::XboxScarlett: case PlatformType::XboxScarlett:
boxId = 7; boxId = 7;
break; break;
case PlatformType::Android:
boxId = 8;
break;
default: ; default: ;
} }
value = tryGetValue(node->GetBox(node->GetBox(boxId)->HasConnection() ? boxId : 1), Value::Zero); value = tryGetValue(node->GetBox(node->GetBox(boxId)->HasConnection() ? boxId : 1), Value::Zero);