Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugins/API/Foundation/Editor/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace RealtimeCSG.Foundation
{
internal static class Versioning
{
public const string PluginVersion = "1_571";
public const string PluginVersion = "1_572";
public const string PluginDLLVersion = "1_559";
}
}
25 changes: 2 additions & 23 deletions Plugins/Editor/Scripts/Control/Helpers/MaterialUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,6 @@ internal static bool EqualInternalMaterial(Material o, Material n)
o.name == n.name;
}

private static string GetRenderPipelineType()
{
if( GraphicsSettings.renderPipelineAsset == null )
return string.Empty; // we are using built-in, so do nothing.

string rpDefaultMatShader = GraphicsSettings.renderPipelineAsset.defaultMaterial.shader.name;

if( rpDefaultMatShader.StartsWith( "HDRP" ) )
return "HDRP";

if( rpDefaultMatShader.StartsWith( "LWRP" ) )
return "LWRP";

if( rpDefaultMatShader.StartsWith( "URP" ) || rpDefaultMatShader.StartsWith( "Universal Render Pipeline" ))
return "URP";

return string.Empty; // default rp, do nothing.
}

private static bool TryGetShaderMainTex( Material material, out string mainTexTag )
{
if( material.HasProperty( "_Diffuse" ) )
Expand Down Expand Up @@ -217,9 +198,7 @@ private static void GenerateBuiltinPipelineMaterial( string name )
return;
}

string rpType = GetRenderPipelineType();

if( !string.IsNullOrEmpty( rpType ) ) // if we are using any RP
if( GraphicsSettings.renderPipelineAsset != null ) // if we are using any RP
{
AssetDatabase.StartAssetEditing();

Expand Down Expand Up @@ -290,7 +269,7 @@ internal static Material GetRuntimeMaterial( string materialName )
GenerateBuiltinPipelineMaterial( WindowMaterialName );
GenerateBuiltinPipelineMaterial( MetalMaterialName );

return Resources.Load<Material>( string.Format( "RealtimeCSG/Materials/{0}/{1}", GetRenderPipelineType(), materialName ) );
return Resources.Load<Material>( string.Format( "RealtimeCSG/Materials/{0}", materialName ) );
}

internal static PhysicMaterial GetRuntimePhysicMaterial(string materialName)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.prenominal.realtimecsg",
"version": "1.57.1",
"version": "1.57.2",
"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.",
"displayName": "RealtimeCSG",
"unity": "2018.3",
Expand Down