From 9d8983acb2cd0eafc246326b27fdfd4358fa81f6 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 21 Oct 2019 19:22:13 -0500 Subject: [PATCH] materials.cs files are still being automatically executed reguardless of location twice. shifted the ribbonshader shaderdata defines from new to singleton to avoid attempts at duplicated creation. --- .../BaseGame/game/core/gameObjects/materials/materials.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/BaseGame/game/core/gameObjects/materials/materials.cs b/Templates/BaseGame/game/core/gameObjects/materials/materials.cs index 9ea6fa1bd..af1f49cf7 100644 --- a/Templates/BaseGame/game/core/gameObjects/materials/materials.cs +++ b/Templates/BaseGame/game/core/gameObjects/materials/materials.cs @@ -1,4 +1,4 @@ -new ShaderData( BasicRibbonShader ) +singleton ShaderData( BasicRibbonShader ) { DXVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/basicRibbonShaderV.hlsl"; DXPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/basicRibbonShaderP.hlsl"; @@ -26,7 +26,7 @@ singleton CustomMaterial( BasicRibbonMat ) preload = true; }; -new ShaderData( TexturedRibbonShader ) +singleton ShaderData( TexturedRibbonShader ) { DXVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/texRibbonShaderV.hlsl"; DXPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/texRibbonShaderP.hlsl";