Skip to content

Commit

Permalink
Removed some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachee committed Feb 6, 2023
1 parent 70f3e8a commit 9eae079
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
7 changes: 0 additions & 7 deletions Editor/Utilities/RandomListDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ public sealed class RandomListDrawer : UnityEditor.PropertyDrawer


private const int WEIGHT_HEIGHT = 32;
private const int WEIGHT_RANGE_PADDING = 2;
private static readonly int WEIGHT_SLIDER_ID = "RISTSliderIDHash".GetHashCode();

private int _selectedSlider = -1;
private int _selectedWeight = -1;
private ReorderableList _list;


Expand Down Expand Up @@ -253,16 +251,11 @@ private void OnSliderBoxGUI(Rect groupRect, SerializedProperty property, List<We
evt.Use();
GUIUtility.hotControl = sliderId;

// Check for button click
var clickedButton = false;


foreach (var weight in sliders)
{
if (weight.buttonPosition.Contains(evt.mousePosition))
{
_selectedSlider = weight.index;
clickedButton = true;
break;
}
}
Expand Down
6 changes: 3 additions & 3 deletions Runtime/Behaviours/PerCameraSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static RenderSettingsState FromCurrentRenderSettings()
[Auto, SerializeField]
private new Camera camera;

public bool enabled = true;
public bool active = true;
public RenderSettingsState renderSettings;

[System.Serializable]
Expand All @@ -95,7 +95,7 @@ public class GlobalShaderProperty

private void OnPreRender()
{
if (!enabled) return;
if (!active) return;
#if UNITY_EDITOR && false
if (Application.isPlaying)
#endif
Expand All @@ -112,7 +112,7 @@ private void OnPreRender()

private void OnPostRender()
{
if (!enabled) return;
if (!active) return;
#if UNITY_EDITOR && false
if (Application.isPlaying)
#endif
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Utilities/Singleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class Singleton<T> : MonoBehaviour where T : Singleton<T>
internal static T _instance;
private static bool _isquitting = false;

#if UNITY_2019_2_OR_NEWER
#if false && UNITY_2019_2_OR_NEWER
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static void Init()
{
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.lachee.utilities",
"version": "1.4.5",
"version": "1.4.6",
"displayName": "Lachee's Utilities",
"description": "Bunch of utility functionality",
"unity": "2019.1",
Expand Down

0 comments on commit 9eae079

Please sign in to comment.