Skip to content

Commit 33e228e

Browse files
committed
Added some public methods to help adjust config.
1 parent 7571a25 commit 33e228e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Scripts/PaintDecal.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public override void OnInspectorGUI() {
2323
#endif
2424

2525
public class PaintDecal : MonoBehaviour {
26-
[SerializeField] [Range(32f,2048f)]
26+
[SerializeField] [Range(16f,2048f)]
2727
[Tooltip("Memory usage in megabytes before old textures get removed.")]
2828
private float memoryBudgetMB = 512f;
2929

@@ -47,6 +47,12 @@ [SerializeField] [Tooltip("If we should run dilation techniques to hide seams.")
4747
private int memoryBudget => Mathf.RoundToInt(memoryBudgetMB * 1000000f);
4848
public static int GetMemoryBudget() => instance.memoryBudget;
4949
public static bool IsDilateEnabled() => instance.dilate;
50+
public static void SetDilation(bool dilation) {
51+
instance.dilate = dilation;
52+
}
53+
public static void SetTexelsPerMeter(float newTexelsPerMeter) {
54+
instance.texelsPerMeter = Mathf.Max(newTexelsPerMeter,1);
55+
}
5056

5157

5258
private const string defaultTextureName = "_DecalColorMap";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.naelstrof.skinnedmeshdecals",
33
"displayName": "Skinned Mesh Decals",
4-
"version": "6.7.5",
4+
"version": "6.7.6",
55
"unity": "2018.3",
66
"description": "Renders decals on arbitrary meshes, for any pipeline."
77
}

0 commit comments

Comments
 (0)