diff --git a/readme.md b/readme.md
index bfcfea0428..f4ca1fcb0e 100644
--- a/readme.md
+++ b/readme.md
@@ -19,7 +19,7 @@ As of now there are no release builds yet, because the project is still very muc
To get it running inside of Unity, you need the following prerequisites:
- Everything mentioned in OpenRCT2's original [building prerequisites](#31-building-prerequisites).
-- [Unity Editor version LTS 2019.4.6f1](https://unity3d.com/unity/qa/lts-releases?version=2019.4).
+- [Unity Editor version LTS 2019.4.13f1](https://unity3d.com/unity/qa/lts-releases?version=2019.4).
**Note:** only the Windows setup has been tested.
diff --git a/src/openrct2-dll/Export/Sprites.cpp b/src/openrct2-dll/Export/Sprites.cpp
index 1ff05e8286..7325bf1341 100644
--- a/src/openrct2-dll/Export/Sprites.cpp
+++ b/src/openrct2-dll/Export/Sprites.cpp
@@ -14,8 +14,21 @@ extern "C"
}
+ struct PeepEntity
+ {
+ public:
+ uint16_t idx;
+ int32_t x;
+ int32_t y;
+ int32_t z;
+
+ uint8_t tshirt_colour;
+ uint8_t trousers_colour;
+ };
+
+
// Loads all the peeps into the specified buffer, returns the total amount of peeps loaded.
- EXPORT int GetAllPeeps(Peep* peeps, int arraySize)
+ EXPORT int GetAllPeeps(PeepEntity* peeps, int arraySize)
{
Peep* peep;
uint16_t spriteIndex;
@@ -23,7 +36,14 @@ extern "C"
FOR_ALL_PEEPS (spriteIndex, peep)
{
- peeps[peepCount] = *peep;
+ PeepEntity* data = &peeps[peepCount];
+ data->idx = peep->sprite_index;
+ data->x = peep->x;
+ data->y = peep->y;
+ data->z = peep->z;
+ data->tshirt_colour = peep->tshirt_colour;
+ data->trousers_colour = peep->trousers_colour;
+
peepCount++;
if (peepCount >= arraySize)
@@ -33,7 +53,41 @@ extern "C"
}
- struct RideVehicle
+ struct PeepStats
+ {
+ public:
+ uint8_t energy;
+ uint8_t happiness;
+ uint8_t nausea;
+ uint8_t hunger;
+ uint8_t thirst;
+ uint8_t toilet;
+ uint8_t intensity;
+ };
+
+
+ EXPORT bool GetPeepStats(uint16_t spriteIndex, PeepStats* peepStats)
+ {
+ Peep* peep = GET_PEEP(spriteIndex);
+
+ if (peep != nullptr)
+ {
+ printf("(me) Peep does not exist anymore. ( sprite id: %i )\n", spriteIndex);
+ return false;
+ }
+
+ peepStats->energy = peep->energy;
+ peepStats->happiness = peep->happiness;
+ peepStats->nausea = peep->nausea;
+ peepStats->hunger = peep->hunger;
+ peepStats->thirst = peep->thirst;
+ peepStats->toilet = peep->toilet;
+ peepStats->intensity = peep->intensity;
+ return true;
+ }
+
+
+ struct VehicleEntity
{
public:
uint16_t idx;
@@ -50,7 +104,7 @@ extern "C"
// Loads all the vehicles into the specified buffer, returns the total amount of vehicles loaded.
- EXPORT int GetAllVehicles(RideVehicle* vehicles, int arraySize)
+ EXPORT int GetAllVehicles(VehicleEntity* vehicles, int arraySize)
{
Vehicle *train, *vehicle;
int vehicleCount = 0;
@@ -67,7 +121,7 @@ extern "C"
//printf("(me) %i vehicle %i at %i, %i, %i\n", vehicleCount, vehicle->sprite_index, vehicle->x, vehicle->y, vehicle->z);
- RideVehicle* target = &vehicles[vehicleCount];
+ VehicleEntity* target = &vehicles[vehicleCount];
target->idx = vehicle->sprite_index;
target->x = vehicle->x;
diff --git a/src/openrct2-unity/Assets/Materials/Shaders/Functions/PathTransformerFormula.hlsl b/src/openrct2-unity/Assets/Materials/Shaders/Functions/PathTransformerFormula.hlsl
index 7974993e16..462c259f95 100644
--- a/src/openrct2-unity/Assets/Materials/Shaders/Functions/PathTransformerFormula.hlsl
+++ b/src/openrct2-unity/Assets/Materials/Shaders/Functions/PathTransformerFormula.hlsl
@@ -4,7 +4,6 @@
static const float2 aspect_ratio = float2(64, 31); // max pixel width+height of a tile.
static const float scale = 1 / 1.41421356237; // diagonal tile distance.
-static const float radians = 0.785398163; // 45 degrees in radians.
static const float3x3 rotation_matrix = float3x3 // this is correct now for rotating in 3d
@@ -266,4 +265,98 @@ void Rct_path_matrix_float(float2 uv, float2 size, float2 offset, out float2 Out
return;
}
+
+
+float3x3 matrix_euler_rot(float3 rotation)
+{
+ float x = radians(rotation.x);
+ float3x3 mat_x = float3x3
+ (
+ 1, 0, 0,
+ 0, cos(x), -sin(x),
+ 0, sin(x), cos(x)
+ );
+
+ float y = radians(rotation.y);
+ float3x3 mat_y = float3x3
+ (
+ cos(y), 0, sin(y),
+ 0, 1, 0,
+ -sin(y), 0, cos(y)
+ );
+
+ float z = radians(rotation.z);
+ float3x3 mat_z = float3x3
+ (
+ cos(z), -sin(z), 0,
+ sin(z), cos(z), 0,
+ 0, 0, 1
+ );
+
+ return (mat_z * mat_y * mat_x);
+}
+
+
+
+float3x3 rotationMatrix(float3 axis, float angle)
+{
+ // the usual method, copied from
+ // http://www.neilmendoza.com/glsl-rotation-about-an-arbitrary-axis/
+ //
+ axis = normalize(axis);
+ float s = sin(angle);
+ float c = cos(angle);
+ float oc = 1.0 - c;
+
+ return float3x3
+ (
+ oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s,
+ oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s,
+ oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c
+ );
+}
+
+float3x3 createCameraYPR(float cameraYaw, float cameraPitch, float cameraRoll)
+{
+ float3 forward = -normalize(float3(sin(cameraYaw), sin(cameraPitch), cos(cameraYaw)));
+ float3 up = float3(0.0, 1.0, 0.0);
+ float3 cameraRight = normalize(cross(forward, up));
+ float3 cameraUp = normalize(cross(cameraRight, forward));
+ return rotationMatrix(forward, cameraRoll) * float3x3(cameraRight, cameraUp, forward);
+}
+
+
+float remap(float value, float2 from, float2 to)
+{
+ return ((value - from.x) / (from.y - from.x)) * (to.y - to.x) + to.x;
+}
+
+
+float2 resize_rct(float2 uv, float2 size, float2 offset)
+{
+ float2 scaled = uv * size;
+
+ return float2
+ (
+ remap(scaled.x, float2(0, size.x), float2(-offset.x - 32, -offset.x + 32)),
+ remap(scaled.y, float2(0, size.y), float2((size.y + offset.y) - 31, size.y + offset.y))
+ );
+}
+
+
+void resize_rct_float(float2 uv, float2 size, float2 offset, out float2 Out)
+{
+ Out = resize_rct(uv, size, offset);
+}
+
+
+void matrix_euler_rot_float(float2 uv, float3 rotation, out float3 Out)
+{
+ float3x3 cameraMatrix = createCameraYPR(radians(rotation.x), radians(rotation.y), radians(rotation.z));
+ Out = mul(cameraMatrix, normalize(float3(uv, 1)));
+
+ //float3x3 mat = matrix_euler_rot(rotation);
+ //Out = mul(mat, float3(uv, 1));
+ }
+
#endif
diff --git a/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph b/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph
new file mode 100644
index 0000000000..d54d580500
--- /dev/null
+++ b/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph
@@ -0,0 +1,121 @@
+{
+ "m_SerializedProperties": [],
+ "m_SerializedKeywords": [],
+ "m_SerializableNodes": [
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"145f3aef-0ec9-4d1d-b5f2-f12a0b4f70cc\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 0.0,\n \"y\": 0.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_DOTSInstancing\": false,\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalPBRSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_Model\": 1,\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_NormalDropOffSpace\": 0\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.CustomFunctionNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"0c6e7b96-9686-4986-a1d7-b596ecb82a1f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -649.0,\n \"y\": 161.00001525878907,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"uv\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"uv\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"rotation\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"rotation\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 645.2999877929688,\\n \\\"y\\\": 92.48999786376953,\\n \\\"z\\\": 24.270000457763673\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 0,\n \"m_FunctionName\": \"matrix_euler_rot\",\n \"m_FunctionSource\": \"c1557785be95be44db2f53c1f6035ee5\",\n \"m_FunctionBody\": \"Enter function body here...\"\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.UVNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"4145b14b-2bf3-44b6-84ce-c1772bb377ba\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"UV\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1624.0,\n \"y\": 110.0,\n \"width\": 145.0,\n \"height\": 129.00001525878907\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_OutputChannel\": 0\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"7acbd73e-c224-46ed-a4b8-61181ffe1c6f\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -347.0000305175781,\n \"y\": -15.999992370605469,\n \"width\": 208.0,\n \"height\": 433.0000305175781\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"dffef66376be4fa480fb02b19edbe903\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"dd4967f8-438a-46dc-af56-36dc41626ef6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 278.9999694824219,\n \"y\": -751.9999389648438,\n \"width\": 208.0,\n \"height\": 433.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"fileID\\\\\\\":2800000,\\\\\\\"guid\\\\\\\":\\\\\\\"e6f3414dd6596424ea5dc5d8f1d3aa1b\\\\\\\",\\\\\\\"type\\\\\\\":3}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.RotateAboutAxisNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"b86d03b2-d95b-44ae-b6db-4938c50eee82\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Rotate About Axis\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -982.0000610351563,\n \"y\": -378.0,\n \"width\": 208.0,\n \"height\": 361.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Axis\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Axis\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Rotation\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Rotation\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 45.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Unit\": 1\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.RotateAboutAxisNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"75120cbd-1b96-4eb1-847a-0e2365c8f3f8\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Rotate About Axis\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -708.0,\n \"y\": -504.00006103515627,\n \"width\": 207.99998474121095,\n \"height\": 361.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Axis\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Axis\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Rotation\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Rotation\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 30.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Unit\": 1\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.AddNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"83f1be5b-1d8c-4e2b-8b42-662c860ef451\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -64.0000228881836,\n \"y\": -677.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.4099999964237213,\\n \\\"y\\\": 1.2200000286102296,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.CustomFunctionNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"5fbbb3d5-21d0-449f-bfbc-6528d6e20235\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -1344.0,\n \"y\": -267.9999694824219,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"uv\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"uv\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"size\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"size\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 34.0,\\n \\\"y\\\": 25.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector2MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"offset\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"offset\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": -7.0,\\n \\\"y\\\": 3.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 0,\n \"m_FunctionName\": \"resize_rct\",\n \"m_FunctionSource\": \"c1557785be95be44db2f53c1f6035ee5\",\n \"m_FunctionBody\": \"Enter function body here...\"\n}"
+ }
+ ],
+ "m_Groups": [],
+ "m_StickyNotes": [],
+ "m_SerializableEdges": [
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4145b14b-2bf3-44b6-84ce-c1772bb377ba\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0c6e7b96-9686-4986-a1d7-b596ecb82a1f\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0c6e7b96-9686-4986-a1d7-b596ecb82a1f\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"7acbd73e-c224-46ed-a4b8-61181ffe1c6f\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"dd4967f8-438a-46dc-af56-36dc41626ef6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"145f3aef-0ec9-4d1d-b5f2-f12a0b4f70cc\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"b86d03b2-d95b-44ae-b6db-4938c50eee82\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"75120cbd-1b96-4eb1-847a-0e2365c8f3f8\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4145b14b-2bf3-44b6-84ce-c1772bb377ba\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5fbbb3d5-21d0-449f-bfbc-6528d6e20235\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5fbbb3d5-21d0-449f-bfbc-6528d6e20235\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"b86d03b2-d95b-44ae-b6db-4938c50eee82\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"83f1be5b-1d8c-4e2b-8b42-662c860ef451\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"dd4967f8-438a-46dc-af56-36dc41626ef6\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"75120cbd-1b96-4eb1-847a-0e2365c8f3f8\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"83f1be5b-1d8c-4e2b-8b42-662c860ef451\"\n }\n}"
+ }
+ ],
+ "m_PreviewData": {
+ "serializedMesh": {
+ "m_SerializedMesh": "{\"mesh\":{\"fileID\":10210,\"guid\":\"0000000000000000e000000000000000\",\"type\":0}}",
+ "m_Guid": ""
+ }
+ },
+ "m_Path": "Shader Graphs",
+ "m_ConcretePrecision": 0,
+ "m_ActiveOutputNodeGuidSerialized": "145f3aef-0ec9-4d1d-b5f2-f12a0b4f70cc"
+}
\ No newline at end of file
diff --git a/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph.meta b/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph.meta
new file mode 100644
index 0000000000..1d134071aa
--- /dev/null
+++ b/src/openrct2-unity/Assets/Materials/Shaders/TestShader.shadergraph.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: a04551dc34cd72f47887b21de48fe40a
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
diff --git a/src/openrct2-unity/Assets/Scenes/ParkScene.unity b/src/openrct2-unity/Assets/Scenes/ParkScene.unity
index 80e74303c6..a8b149afd9 100644
--- a/src/openrct2-unity/Assets/Scenes/ParkScene.unity
+++ b/src/openrct2-unity/Assets/Scenes/ParkScene.unity
@@ -168,7 +168,7 @@ GameObject:
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
+ m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!114 &108384298
MonoBehaviour:
@@ -465,7 +465,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 49e4dcf5847a0b1499de244f93c83a43, type: 3}
m_Name:
m_EditorClassIdentifier:
- canvasManager: {fileID: 1779574330}
+ windowManager: {fileID: 1779574330}
peepController: {fileID: 1491562773}
--- !u!1 &457888653
GameObject:
@@ -1057,7 +1057,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
- m_IsActive: 0
+ m_IsActive: 1
--- !u!114 &885425400
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1496,7 +1496,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 79be679884da2154dacd80be9669d5dc, type: 3}
m_Name:
m_EditorClassIdentifier:
- selectedPark: Three Monkeys Park.sv6
+ selectedPark: Europe - European Cultural Festival.SC6
--- !u!4 &1347800243
Transform:
m_ObjectHideFlags: 0
@@ -2141,7 +2141,7 @@ GameObject:
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
+ m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!114 &1779574330
MonoBehaviour:
@@ -2155,9 +2155,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eb1ffec044d775144bb9308228979414, type: 3}
m_Name:
m_EditorClassIdentifier:
- peepBox: {fileID: 8219538139994365458, guid: 8f7aedb4e26ded34b9d6c0a26bff6792, type: 3}
- peepCanvas: {fileID: 885425399}
- peepController: {fileID: 1491562773}
+ peepWindowPrefab: {fileID: 8219538139994365458, guid: 8f7aedb4e26ded34b9d6c0a26bff6792,
+ type: 3}
+ parentCanvas: {fileID: 885425399}
--- !u!224 &1779574331
RectTransform:
m_ObjectHideFlags: 0
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Imports/OpenRCT2.Sprites.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Imports/OpenRCT2.Sprites.cs
index 58fc1811d4..45509e2057 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Imports/OpenRCT2.Sprites.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Imports/OpenRCT2.Sprites.cs
@@ -16,10 +16,6 @@ namespace Lib
static extern int GetAllPeeps([Out] Peep[] elements, int arraySize);
- [DllImport(PluginFile, CallingConvention = CallingConvention.Cdecl)]
- static extern int GetAllVehicles([Out] Vehicle[] elements, int arraySize);
-
-
///
/// Returns all peeps in the park.
///
@@ -42,6 +38,19 @@ namespace Lib
=> GetAllPeeps(buffer, buffer.Length);
+ ///
+ /// Gets certain statiscics about this peep, like its hunger or energy.
+ /// Returns true if the peep stats were succesfully read, or false if
+ /// the peep does not exist (anymore).
+ ///
+ [DllImport(PluginFile, CallingConvention = CallingConvention.Cdecl)]
+ internal static extern bool GetPeepStats(ushort spriteIndex, ref PeepStats peepStats);
+
+
+ [DllImport(PluginFile, CallingConvention = CallingConvention.Cdecl)]
+ static extern int GetAllVehicles([Out] Vehicle[] elements, int arraySize);
+
+
///
/// Reads all vehicles in the park into the specified buffer.
///
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PaletteEntry.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PaletteEntry.cs
index e48b643ef9..9e55d4aeba 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PaletteEntry.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PaletteEntry.cs
@@ -4,12 +4,12 @@ using UnityEngine;
namespace Lib
{
[StructLayout(LayoutKind.Sequential, Size = 4)]
- public struct PaletteEntry
+ public readonly struct PaletteEntry
{
- public byte blue;
- public byte green;
- public byte red;
- public byte alpha;
+ public readonly byte blue;
+ public readonly byte green;
+ public readonly byte red;
+ public readonly byte alpha;
// Converts the 0-255 color byte to a float between 0 and 1.
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Peep.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Peep.cs
index c6d58975b3..33b9166a58 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Peep.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Peep.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
using Sprites;
using UnityEngine;
@@ -8,97 +7,29 @@ namespace Lib
///
/// The struct of a peep, which can be either a guest or a staff member.
///
- [StructLayout(LayoutKind.Sequential, Size = (256 + Ptr.Size))]
- public struct Peep : ISprite
+ [StructLayout(LayoutKind.Sequential)]
+ public readonly struct Peep : ISprite
{
- public SpriteBase sprite;
- public IntPtr namePtr; // The real name
- public int nextLocX;
- public int nextLocY;
- public int nextLocZ;
- public byte nextFlags;
- public byte outsideOfPark;
- public PeepState state;
- public PeepSubState substate;
- public PeepSpriteType spriteType;
- public PeepType type;
- public byte staffTypeOrNoOfRides; // union of staff type or no. of rides.
- public byte tshirtColour;
- public byte trousersColour;
- public ushort destinationX; // Location that the peep is trying to get to
- public ushort destinationY;
- public byte destinationTolerance; // How close to destination before next action/state 0 = exact
- public byte var37;
- public byte energy;
- public byte energyTarget;
- public byte happiness;
- public byte happinessTarget;
- public byte nausea;
- public byte nauseaTarget;
- public byte hunger;
- public byte thirst;
- public byte toilet;
- public byte mass;
- public byte timeToConsume;
- public byte intensity; // The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits
- public byte nauseaTolerance;
- public byte windowInvalidateFlags;
- public short paidOnDrink;
- public long rideTypesBeenOn1; // This is 16x a byte for a ride;
- public long rideTypesBeenOn2;
- public uint itemExtraFlags;
- public byte photo2RideRef;
- public byte photo3RideRef;
- public byte photo4RideRef;
- public byte currentRide;
- public byte stationIndex;
- public byte currentTrain;
- public ushort currentCarAndSeatOrTimeToSitDownOrTimeToStandAndStandingFlags;
- public byte specialSprite;
- public PeepActionSprite actionSpriteType;
- public PeepActionSprite nextActionSpriteType;
- public byte actionSpriteImageOffset;
- public PeepAction action;
- public byte actionFrame;
- public byte stepProgress;
- public ushort MechanicTimeSinceCallOrNextInQueue; // time getting to ride to fix
- public byte MazeLastEdgeOrDirection;
- public byte interactionRideIndex;
- public ushort timeInQueue;
- public long ridesBeenOn1;
- public long ridesBeenOn2;
- public long ridesBeenOn3;
- public long ridesBeenOn4;
- public uint id;
- public int cashInPocket;
- public int cashSpent;
- public int timeInPark;
- public byte rejoinQueueTimeOut;
- public byte previousRide;
- public ushort previousRideTimeOut;
- public uint peepThoughts;
- public byte pathCheckOptimisation;
- public byte staffIdOrGuestHeadingToRideId;
- public byte staffOrdersOrPeepIsLostCountdown;
- public byte photo1RideRef;
- public uint peepFlags;
+ public readonly ushort idx;
+ public readonly int x;
+ public readonly int y;
+ public readonly int z;
+
+ public readonly byte tshirtColour;
+ public readonly byte trousersColour;
///
/// Returns an id of the peep, currently based on the sprite index.
///
public ushort Id
- => sprite.spriteIndex;
-
-
- public string Name
- => Marshal.PtrToStringAuto(namePtr);
+ => idx;
///
/// Returns the peep's position in Unity coordinates.
///
public Vector3 Position
- => Map.CoordsToVector3(sprite.x, sprite.z, sprite.y);
+ => Map.CoordsToVector3(x, z, y);
}
}
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs
new file mode 100644
index 0000000000..cfc6e9ffe1
--- /dev/null
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs
@@ -0,0 +1,32 @@
+using System.Runtime.InteropServices;
+
+namespace Lib
+{
+ ///
+ /// This struct contains certain statistics about a peep, like its energy
+ /// and happiness.
+ ///
+ [StructLayout(LayoutKind.Sequential)]
+ public readonly struct PeepStats
+ {
+ public readonly byte energy;
+ public readonly byte happiness;
+ public readonly byte nausea;
+ public readonly byte hunger;
+ public readonly byte thirst;
+ public readonly byte toilet;
+ public readonly byte intensity; // First 4 bits = max intensity, second 4 bits = min intensity.
+
+
+ ///
+ /// Minimum intensity level for this peep.
+ ///
+ public byte MinIntensity => (byte)(intensity & 0b1111);
+
+
+ ///
+ /// Maximum intensity level for this peep.
+ ///
+ public byte MaxIntensity => (byte)(intensity >> 4);
+ }
+}
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs.meta b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs.meta
similarity index 83%
rename from src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs.meta
rename to src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs.meta
index 7c26d8b2d9..3b90e18f57 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs.meta
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/PeepStats.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: a1c934bf1aaf15445b2f43583a0b36d0
+guid: 522d7dcda4f5c2e469e4d0a88107ec39
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs
deleted file mode 100644
index 8e4df28b6e..0000000000
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteBase.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Runtime.InteropServices;
-
-namespace Lib
-{
- [StructLayout(LayoutKind.Sequential, Size = 31)]
- public struct SpriteBase
- {
- public byte spriteIdentifier; // 0
- public byte type; // 1
- public ushort nextInQuadrant; // 2,3
- public ushort next; // 4,5
- public ushort previous; // 6,7
- public byte linkedListIndex; // 8; Valid values are SPRITE_LINKEDLIST_OFFSET_...
- public byte spriteHeightNegative; // 9; Height from centre of sprite to bottom
- public ushort spriteIndex; // 10,11
- public ushort flags; // 12,13
- public short x; // 14,15
- public short y; // 16,17
- public short z; // 18,19
- public byte spriteWidth; // 20; Width from centre of sprite to edge
- public byte spriteHeightPositive; // 21; Height from centre of sprite to top
-
- // Screen Coordinates of sprite
- public short sprite_left; // 22,23
- public short sprite_top; // 24,25
- public short sprite_right; // 26,27
- public short sprite_bottom; // 28,29
- public byte sprite_direction; // 30
- }
-}
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteData.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteData.cs
index b65d4df846..33ddf86f4b 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteData.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/SpriteData.cs
@@ -6,16 +6,16 @@ namespace Lib
/// Struct with data on the sprite.
///
[StructLayout(LayoutKind.Sequential, Size = 8)]
- public struct SpriteData
+ public readonly struct SpriteData
{
// Width + height of the sprite.
- public short width;
- public short height;
+ public readonly short width;
+ public readonly short height;
// The x and y offset that is used to draw the sprite in
// the correct position.
- public short offsetX;
- public short offsetY;
+ public readonly short offsetX;
+ public readonly short offsetY;
///
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Vehicle.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Vehicle.cs
index bb4fe29095..acce6ae8d0 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Vehicle.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/Sprites/Vehicle.cs
@@ -10,19 +10,19 @@ namespace Lib
/// The struct of a ride vehicle.
///
[StructLayout(LayoutKind.Sequential)]
- public struct Vehicle : ISprite
+ public readonly struct Vehicle : ISprite
{
- public ushort idx;
- public int x;
- public int y;
- public int z;
- public byte direction; // 0-31 to indicate direction, 0 = negative x axis direction
- public byte bankRotation;
- public byte vehicleSprite; // this is a index describing what sprite should be used; maybe useless for pitch?
+ public readonly ushort idx;
+ public readonly int x;
+ public readonly int y;
+ public readonly int z;
+ public readonly byte direction; // 0-31 to indicate direction, 0 = negative x axis direction
+ public readonly byte bankRotation;
+ public readonly byte vehicleSprite; // this is a index describing what sprite should be used; maybe useless for pitch?
- public byte trackType; // current track type its on.
- public byte trackDirection; // the direction this track type is in.
- public ushort trackProgress; // current track node index.
+ public readonly byte trackType; // current track type its on.
+ public readonly byte trackDirection; // the direction this track type is in.
+ public readonly ushort trackProgress; // current track node index.
///
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackColour.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackColour.cs
index 2418da6e3f..5e4bd87e3c 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackColour.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackColour.cs
@@ -2,11 +2,11 @@ using System.Runtime.InteropServices;
namespace Lib
{
- [StructLayout(LayoutKind.Sequential, Size = 3)]
- public struct TrackColour
+ [StructLayout(LayoutKind.Sequential)]
+ public readonly struct TrackColour
{
- public byte main;
- public byte additional;
- public byte supports;
+ public readonly byte main;
+ public readonly byte additional;
+ public readonly byte supports;
}
}
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackNode.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackNode.cs
index 8cdae6e062..dcf18155d5 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackNode.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Data/TrackNode.cs
@@ -5,14 +5,14 @@ using UnityEngine;
namespace Lib
{
[StructLayout(LayoutKind.Sequential)]
- public struct TrackNode
+ public readonly struct TrackNode
{
- public short x;
- public short y;
- public short z;
- public byte direction; // 0-31 to indicate direction, 0 = negative x axis direction
- public byte vehicleSprite;
- public byte bankRotation;
+ public readonly short x;
+ public readonly short y;
+ public readonly short z;
+ public readonly byte direction; // 0-31 to indicate direction, 0 = negative x axis direction
+ public readonly byte vehicleSprite;
+ public readonly byte bankRotation;
// Offset to offset the node relative to the center of the start of the track, instead of the corner.
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Entries/SmallSceneryEntry.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Entries/SmallSceneryEntry.cs
index 36cb49435e..ad595b9eed 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Entries/SmallSceneryEntry.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/Entries/SmallSceneryEntry.cs
@@ -7,12 +7,12 @@ namespace Lib
/// It's explicit because it seems C# likes to swap members around for performance?
///
[StructLayout(LayoutKind.Explicit, Size = (26 + Ptr.Size))]
- public struct SmallSceneryEntry
+ public readonly struct SmallSceneryEntry
{
///
/// The flags of this small scenery entry.
///
- [FieldOffset(0x06)] public SmallSceneryFlags Flags;
+ [FieldOffset(0x06)] public readonly SmallSceneryFlags Flags;
/* Memory map:
diff --git a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/TileElement.cs b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/TileElement.cs
index e31de4acb8..ac49564d3a 100644
--- a/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/TileElement.cs
+++ b/src/openrct2-unity/Assets/Scripts/OpenRCT2/TileElements/TileElement.cs
@@ -4,27 +4,27 @@ using System.Runtime.InteropServices;
namespace Lib
{
[StructLayout(LayoutKind.Sequential, Size = 16)]
- public struct TileElement : IEquatable
+ public readonly struct TileElement : IEquatable
{
- public byte type;
- public byte flags;
- public byte baseHeight;
- public byte clearanceHeight;
+ public readonly byte type;
+ public readonly byte flags;
+ public readonly byte baseHeight;
+ public readonly byte clearanceHeight;
- public byte slot0x1;
- public byte slot0x2;
- public byte slot0x3;
- public byte slot0x4;
+ public readonly byte slot0x1;
+ public readonly byte slot0x2;
+ public readonly byte slot0x3;
+ public readonly byte slot0x4;
- public byte slot0x5;
- public byte slot0x6;
- public byte slot0x7;
- public byte slot0x8;
+ public readonly byte slot0x5;
+ public readonly byte slot0x6;
+ public readonly byte slot0x7;
+ public readonly byte slot0x8;
- public byte slot0x9;
- public byte slot0xA;
- public byte slot0xB;
- public byte slot0xC;
+ public readonly byte slot0x9;
+ public readonly byte slot0xA;
+ public readonly byte slot0xB;
+ public readonly byte slot0xC;
// The mask skim off the extra bits, to retrieve the actual type.
@@ -54,7 +54,7 @@ namespace Lib
///
/// Compares two tile elements to see whether they are equal.
///
- public static bool Equals(ref TileElement left, ref TileElement right)
+ public static bool Equals(in TileElement left, in TileElement right)
=> (left.type == right.type)
&& (left.flags == right.flags)
&& (left.baseHeight == right.baseHeight)
@@ -75,22 +75,22 @@ namespace Lib
///
public override bool Equals(object obj)
- => (obj is TileElement tile && Equals(ref this, ref tile));
+ => (obj is TileElement tile && Equals(this, tile));
///
public bool Equals(TileElement other)
- => (Equals(ref this, ref other));
+ => (Equals(this, other));
///
public static bool operator ==(TileElement left, TileElement right)
- => (Equals(ref left, ref right));
+ => (Equals(left, right));
///
public static bool operator !=(TileElement left, TileElement right)
- => (!Equals(ref left, ref right));
+ => (!Equals(left, right));
///
diff --git a/src/openrct2-unity/Assets/Scripts/Sprites/PeepController.cs b/src/openrct2-unity/Assets/Scripts/Sprites/PeepController.cs
index 79c520df45..ca39749836 100644
--- a/src/openrct2-unity/Assets/Scripts/Sprites/PeepController.cs
+++ b/src/openrct2-unity/Assets/Scripts/Sprites/PeepController.cs
@@ -1,4 +1,6 @@
+using System.Collections.Generic;
using System.Linq;
+using Graphics;
using Lib;
using UnityEngine;
@@ -11,12 +13,11 @@ namespace Sprites
{
///
- /// Find the associated peep id for the specified gameobject, or
- /// null if the gameobject is not a peep.
+ /// Find the associated peep id for the specified gameobject.
///
public ushort FindPeepIdForGameObject(GameObject peepObject)
{
- var entry = spriteObjects.FirstOrDefault(p => p.Value.gameObject == peepObject);
+ KeyValuePair entry = spriteObjects.FirstOrDefault(p => p.Value.gameObject == peepObject);
int bufferIndex = entry.Value.bufferIndex;
return spriteBuffer[bufferIndex].Id;
@@ -53,8 +54,9 @@ namespace Sprites
GameObject obj = spriteObject.gameObject;
ushort id = sprite.Id;
- PeepType type = sprite.type;
- obj.name = $"{type} {id}";
+ obj.name = $"Peep sprite {id}";
+ //PeepType type = sprite.type;
+ //obj.name = $"{type} {id}";
UpdateColours(obj, ref sprite);
return spriteObject;
@@ -93,116 +95,8 @@ namespace Sprites
var tshirtRenderer = tshirt.GetComponent();
var trousersRenderer = trousers.GetComponent();
- tshirtRenderer.material.color = DecodeColour(peep.tshirtColour);
- trousersRenderer.material.color = DecodeColour(peep.trousersColour);
- }
-
-
- Color DecodeColour(byte colour)
- {
- var colourRGB = new Color32(0, 0, 0, 1);
- switch (colour)
- {
- case 0:
- colourRGB = new Color32(0, 0, 0, 1);
- break;
- case 1:
- colourRGB = new Color32(128, 128, 128, 1);
- break;
- case 2:
- colourRGB = new Color32(255, 255, 255, 1);
- break;
- case 3:
- colourRGB = new Color32(85, 26, 139, 1);
- break;
- case 4:
- colourRGB = new Color32(171, 130, 255, 1);
- break;
- case 5:
- colourRGB = new Color32(160, 32, 240, 1);
- break;
- case 6:
- colourRGB = new Color32(0, 0, 139, 1);
- break;
- case 7:
- colourRGB = new Color32(102, 102, 255, 1);
- break;
- case 8:
- colourRGB = new Color32(135, 206, 235, 1);
- break;
- case 9:
- colourRGB = new Color32(0, 128, 128, 1);
- break;
- case 10:
- colourRGB = new Color32(127, 255, 212, 1);
- break;
- case 11:
- colourRGB = new Color32(124, 205, 124, 1);
- break;
- case 12:
- colourRGB = new Color32(0, 100, 0, 1);
- break;
- case 13:
- colourRGB = new Color32(110, 139, 61, 1);
- break;
- case 14:
- colourRGB = new Color32(0, 255, 0, 1);
- break;
- case 15:
- colourRGB = new Color32(192, 255, 62, 1);
- break;
- case 16:
- colourRGB = new Color32(85, 107, 47, 1);
- break;
- case 17:
- colourRGB = new Color32(255, 255, 0, 1);
- break;
- case 18:
- colourRGB = new Color32(139, 139, 0, 1);
- break;
- case 19:
- colourRGB = new Color32(255, 165, 0, 1);
- break;
- case 20:
- colourRGB = new Color32(255, 127, 0, 1);
- break;
- case 21:
- colourRGB = new Color32(244, 164, 96, 1);
- break;
- case 22:
- colourRGB = new Color32(165, 42, 42, 1);
- break;
- case 23:
- colourRGB = new Color32(205, 170, 125, 1);
- break;
- case 24:
- colourRGB = new Color32(61, 51, 37, 1);
- break;
- case 25:
- colourRGB = new Color32(255, 160, 122, 1);
- break;
- case 26:
- colourRGB = new Color32(205, 55, 0, 1);
- break;
- case 27:
- colourRGB = new Color32(200, 0, 0, 1);
- break;
- case 28:
- colourRGB = new Color32(255, 0, 0, 1);
- break;
- case 29:
- colourRGB = new Color32(205, 16, 118, 1);
- break;
- case 30:
- colourRGB = new Color32(255, 105, 180, 1);
- break;
- case 31:
- colourRGB = new Color32(255, 174, 185, 1);
- break;
- default:
- break;
- }
- return colourRGB;
+ tshirtRenderer.material.color = GraphicsFactory.PaletteToColor(peep.tshirtColour);
+ trousersRenderer.material.color = GraphicsFactory.PaletteToColor(peep.trousersColour);
}
}
}
diff --git a/src/openrct2-unity/Assets/Scripts/Tools/SelectionTool.cs b/src/openrct2-unity/Assets/Scripts/Tools/SelectionTool.cs
index 19bdaacd87..28d5fc0dc6 100644
--- a/src/openrct2-unity/Assets/Scripts/Tools/SelectionTool.cs
+++ b/src/openrct2-unity/Assets/Scripts/Tools/SelectionTool.cs
@@ -7,16 +7,24 @@ namespace Tools
{
public class SelectionTool : MonoBehaviour
{
- [SerializeField] WindowManager canvasManager;
+ [SerializeField] WindowManager windowManager;
[SerializeField] PeepController peepController;
+ Camera mainCamera;
+
+ void Start()
+ {
+ mainCamera = Camera.main;
+ }
+
+
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
- Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
+ Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray, out RaycastHit hit))
{
@@ -31,9 +39,8 @@ namespace Tools
switch (obj.tag)
{
case "Peep":
- canvasManager.CreatePeepWindow(peepController.FindPeepIdForGameObject(obj));
- break;
- default:
+ ushort peepId = peepController.FindPeepIdForGameObject(obj);
+ windowManager.CreatePeepWindow(peepId);
break;
}
}
diff --git a/src/openrct2-unity/Assets/Scripts/Tracks/TrackPiece.cs b/src/openrct2-unity/Assets/Scripts/Tracks/TrackPiece.cs
index eb5da8d5f6..816c5ee52c 100644
--- a/src/openrct2-unity/Assets/Scripts/Tracks/TrackPiece.cs
+++ b/src/openrct2-unity/Assets/Scripts/Tracks/TrackPiece.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-using Lib;
using MeshBuilding;
using UnityEngine;
diff --git a/src/openrct2-unity/Assets/Scripts/UI/PeepWindow.cs b/src/openrct2-unity/Assets/Scripts/UI/PeepWindow.cs
index d307e9a222..aef6551b2e 100644
--- a/src/openrct2-unity/Assets/Scripts/UI/PeepWindow.cs
+++ b/src/openrct2-unity/Assets/Scripts/UI/PeepWindow.cs
@@ -15,14 +15,12 @@ namespace UI
[SerializeField] Slider nauseaBar;
[SerializeField] Slider toiletBar;
- PeepController peepController;
ushort peepId;
- public void LoadPeepController(PeepController peepController, ushort peepId)
+ public void SetPeep(ushort peepId)
{
this.peepId = peepId;
- this.peepController = peepController;
title.text = $"Guest {this.peepId}";
InvokeRepeating(nameof(UpdateData), 0f, 5f);
@@ -31,22 +29,20 @@ namespace UI
void UpdateData()
{
- Peep? peep = peepController.GetPeepById(peepId);
- if (peep == null)
+ PeepStats stats = new PeepStats();
+
+ if (!OpenRCT2.GetPeepStats(peepId, ref stats))
{
Destroy(gameObject);
return;
}
- Peep value = peep.Value;
-
- happinessBar.value = value.happiness;
- energyBar.value = value.energy;
- hungerBar.value = value.hunger;
- thirstBar.value = value.thirst;
- nauseaBar.value = value.nausea;
- toiletBar.value = value.toilet;
-
+ happinessBar.value = stats.happiness;
+ energyBar.value = stats.energy;
+ hungerBar.value = stats.hunger;
+ thirstBar.value = stats.thirst;
+ nauseaBar.value = stats.nausea;
+ toiletBar.value = stats.toilet;
/*
var intensityBinary = System.Convert.ToString(peep.intensity, 2);
var maxIntensityString = System.Convert.ToString(peep.intensity >> 4);
diff --git a/src/openrct2-unity/Assets/Scripts/UI/WindowManager.cs b/src/openrct2-unity/Assets/Scripts/UI/WindowManager.cs
index 27d8edab1f..4ac220096b 100644
--- a/src/openrct2-unity/Assets/Scripts/UI/WindowManager.cs
+++ b/src/openrct2-unity/Assets/Scripts/UI/WindowManager.cs
@@ -6,16 +6,17 @@ namespace UI
{
public class WindowManager : MonoBehaviour
{
- [SerializeField] GameObject peepBox;
- [SerializeField] GameObject peepCanvas;
- [SerializeField] PeepController peepController;
+ [SerializeField] GameObject peepWindowPrefab;
+ [SerializeField] GameObject parentCanvas;
- public void CreatePeepWindow(ushort id)
+ public void CreatePeepWindow(ushort peepId)
{
- GameObject obj = Instantiate(peepBox, peepCanvas.transform);
- obj.name = $"PeepBox: {id}";
- obj.GetComponent().LoadPeepController(peepController, id);
+ GameObject obj = Instantiate(peepWindowPrefab, parentCanvas.transform);
+ obj.name = $"PeepWindow: {peepId}";
+
+ var window = obj.GetComponent();
+ window.SetPeep(peepId);
}
}
}
diff --git a/src/openrct2-unity/Packages/manifest.json b/src/openrct2-unity/Packages/manifest.json
index 239ee2e14d..07a373ebd3 100644
--- a/src/openrct2-unity/Packages/manifest.json
+++ b/src/openrct2-unity/Packages/manifest.json
@@ -1,8 +1,8 @@
{
"dependencies": {
- "com.unity.ide.vscode": "1.2.1",
+ "com.unity.ide.vscode": "1.2.2",
"com.unity.render-pipelines.universal": "7.3.1",
- "com.unity.test-framework": "1.1.14",
+ "com.unity.test-framework": "1.1.18",
"com.unity.textmeshpro": "2.1.1",
"com.unity.timeline": "1.2.14",
"com.unity.ugui": "1.0.0",
diff --git a/src/openrct2-unity/Packages/packages-lock.json b/src/openrct2-unity/Packages/packages-lock.json
index 524e869f58..15365e1a43 100644
--- a/src/openrct2-unity/Packages/packages-lock.json
+++ b/src/openrct2-unity/Packages/packages-lock.json
@@ -8,7 +8,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
- "version": "1.2.1",
+ "version": "1.2.2",
"depth": 0,
"source": "registry",
"dependencies": {},
@@ -43,7 +43,7 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
- "version": "1.1.14",
+ "version": "1.1.18",
"depth": 0,
"source": "registry",
"dependencies": {
@@ -74,7 +74,8 @@
"depth": 0,
"source": "builtin",
"dependencies": {
- "com.unity.modules.ui": "1.0.0"
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0"
}
},
"com.unity.modules.ai": {
diff --git a/src/openrct2-unity/ProjectSettings/PackageManagerSettings.asset b/src/openrct2-unity/ProjectSettings/PackageManagerSettings.asset
new file mode 100644
index 0000000000..9418901fcb
--- /dev/null
+++ b/src/openrct2-unity/ProjectSettings/PackageManagerSettings.asset
@@ -0,0 +1,38 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &1
+MonoBehaviour:
+ m_ObjectHideFlags: 61
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 0}
+ m_Name:
+ m_EditorClassIdentifier: UnityEditor:UnityEditor.PackageManager.UI:PackageManagerProjectSettings
+ m_ScopedRegistriesSettingsExpanded: 1
+ oneTimeWarningShown: 0
+ m_Registries:
+ - m_Id: main
+ m_Name:
+ m_Url: https://packages.unity.com
+ m_Scopes: []
+ m_IsDefault: 1
+ m_UserSelectedRegistryName:
+ m_UserAddingNewScopedRegistry: 0
+ m_RegistryInfoDraft:
+ m_ErrorMessage:
+ m_Original:
+ m_Id:
+ m_Name:
+ m_Url:
+ m_Scopes: []
+ m_IsDefault: 0
+ m_Modified: 0
+ m_Name:
+ m_Url:
+ m_Scopes:
+ -
+ m_SelectedScopeIndex: 0
diff --git a/src/openrct2-unity/ProjectSettings/ProjectSettings.asset b/src/openrct2-unity/ProjectSettings/ProjectSettings.asset
index 284282fbe4..7d4186b371 100644
--- a/src/openrct2-unity/ProjectSettings/ProjectSettings.asset
+++ b/src/openrct2-unity/ProjectSettings/ProjectSettings.asset
@@ -111,8 +111,13 @@ PlayerSettings:
switchNVNShaderPoolsGranularity: 33554432
switchNVNDefaultPoolsGranularity: 16777216
switchNVNOtherPoolsGranularity: 16777216
+ switchNVNMaxPublicTextureIDCount: 0
+ switchNVNMaxPublicSamplerIDCount: 0
+ stadiaPresentMode: 0
+ stadiaTargetFramerate: 0
vulkanNumSwapchainBuffers: 3
vulkanEnableSetSRGBWrite: 0
+ vulkanEnableLateAcquireNextImage: 0
m_SupportedAspectRatios:
4:3: 1
5:4: 1
@@ -191,22 +196,6 @@ PlayerSettings:
uIStatusBarHidden: 1
uIExitOnSuspend: 0
uIStatusBarStyle: 0
- iPhoneSplashScreen: {fileID: 0}
- iPhoneHighResSplashScreen: {fileID: 0}
- iPhoneTallHighResSplashScreen: {fileID: 0}
- iPhone47inSplashScreen: {fileID: 0}
- iPhone55inPortraitSplashScreen: {fileID: 0}
- iPhone55inLandscapeSplashScreen: {fileID: 0}
- iPhone58inPortraitSplashScreen: {fileID: 0}
- iPhone58inLandscapeSplashScreen: {fileID: 0}
- iPadPortraitSplashScreen: {fileID: 0}
- iPadHighResPortraitSplashScreen: {fileID: 0}
- iPadLandscapeSplashScreen: {fileID: 0}
- iPadHighResLandscapeSplashScreen: {fileID: 0}
- iPhone65inPortraitSplashScreen: {fileID: 0}
- iPhone65inLandscapeSplashScreen: {fileID: 0}
- iPhone61inPortraitSplashScreen: {fileID: 0}
- iPhone61inLandscapeSplashScreen: {fileID: 0}
appleTVSplashScreen: {fileID: 0}
appleTVSplashScreen2x: {fileID: 0}
tvOSSmallIconLayers: []
@@ -540,6 +529,7 @@ PlayerSettings:
ps4UseResolutionFallback: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
+ ps4UseLowGarlicFragmentationMode: 1
ps4SocialScreenEnabled: 0
ps4ScriptOptimizationLevel: 0
ps4Audio3dVirtualSpeakerCount: 14
@@ -602,7 +592,7 @@ PlayerSettings:
gcIncremental: 1
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform:
- Standalone: 3
+ Standalone: 6
WebGL: 3
m_RenderingPath: 1
m_MobileRenderingPath: 1
@@ -658,6 +648,7 @@ PlayerSettings:
XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
XboxOneOverrideIdentityName:
+ XboxOneOverrideIdentityPublisher:
vrEditorSettings:
daydream:
daydreamIconForeground: {fileID: 0}
diff --git a/src/openrct2-unity/ProjectSettings/ProjectVersion.txt b/src/openrct2-unity/ProjectSettings/ProjectVersion.txt
index d518aa3754..66132d0e5e 100644
--- a/src/openrct2-unity/ProjectSettings/ProjectVersion.txt
+++ b/src/openrct2-unity/ProjectSettings/ProjectVersion.txt
@@ -1,2 +1,2 @@
-m_EditorVersion: 2019.4.6f1
-m_EditorVersionWithRevision: 2019.4.6f1 (a7aea80e3716)
+m_EditorVersion: 2019.4.13f1
+m_EditorVersionWithRevision: 2019.4.13f1 (518737b1de84)