Skip to content

Commit a3ccdb6

Browse files
authored
Fix #344 (#348)
* fix #344 * update version
1 parent 2d3eab3 commit a3ccdb6

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

Plugins/API/Foundation/Editor/Version.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace RealtimeCSG.Foundation
22
{
33
internal static class Versioning
44
{
5-
public const string PluginVersion = "1_571";
5+
public const string PluginVersion = "1_572";
66
public const string PluginDLLVersion = "1_559";
77
}
88
}

Plugins/Editor/Scripts/Control/Helpers/MaterialUtility.cs

+2-23
Original file line numberDiff line numberDiff line change
@@ -145,25 +145,6 @@ internal static bool EqualInternalMaterial(Material o, Material n)
145145
o.name == n.name;
146146
}
147147

148-
private static string GetRenderPipelineType()
149-
{
150-
if( GraphicsSettings.renderPipelineAsset == null )
151-
return string.Empty; // we are using built-in, so do nothing.
152-
153-
string rpDefaultMatShader = GraphicsSettings.renderPipelineAsset.defaultMaterial.shader.name;
154-
155-
if( rpDefaultMatShader.StartsWith( "HDRP" ) )
156-
return "HDRP";
157-
158-
if( rpDefaultMatShader.StartsWith( "LWRP" ) )
159-
return "LWRP";
160-
161-
if( rpDefaultMatShader.StartsWith( "URP" ) || rpDefaultMatShader.StartsWith( "Universal Render Pipeline" ))
162-
return "URP";
163-
164-
return string.Empty; // default rp, do nothing.
165-
}
166-
167148
private static bool TryGetShaderMainTex( Material material, out string mainTexTag )
168149
{
169150
if( material.HasProperty( "_Diffuse" ) )
@@ -217,9 +198,7 @@ private static void GenerateBuiltinPipelineMaterial( string name )
217198
return;
218199
}
219200

220-
string rpType = GetRenderPipelineType();
221-
222-
if( !string.IsNullOrEmpty( rpType ) ) // if we are using any RP
201+
if( GraphicsSettings.renderPipelineAsset != null ) // if we are using any RP
223202
{
224203
AssetDatabase.StartAssetEditing();
225204

@@ -290,7 +269,7 @@ internal static Material GetRuntimeMaterial( string materialName )
290269
GenerateBuiltinPipelineMaterial( WindowMaterialName );
291270
GenerateBuiltinPipelineMaterial( MetalMaterialName );
292271

293-
return Resources.Load<Material>( string.Format( "RealtimeCSG/Materials/{0}/{1}", GetRenderPipelineType(), materialName ) );
272+
return Resources.Load<Material>( string.Format( "RealtimeCSG/Materials/{0}", materialName ) );
294273
}
295274

296275
internal static PhysicMaterial GetRuntimePhysicMaterial(string materialName)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.prenominal.realtimecsg",
3-
"version": "1.57.1",
3+
"version": "1.57.2",
44
"description": "RealtimeCSG is a CSG level design tool, that allows you to intuitively and rapidly create levels. With its non-destructive workflow, you can easily adjust your levels at any time, and iterate with instant feedback.",
55
"displayName": "RealtimeCSG",
66
"unity": "2018.3",

0 commit comments

Comments
 (0)