File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff 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" ;
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments