net.dreditor.addons 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/Add-Ons.txt.meta CHANGED
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: 14094945d7532e94bbcd7e2c93aaa11f
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 14094945d7532e94bbcd7e2c93aaa11f
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -1,43 +1,43 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using System.Collections.Generic;
3
- using UnityEngine;
4
-
5
- namespace DREditor.AddOns
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- /// <remarks></remarks>
11
- [RequireComponent(typeof(Animator))]
12
- public class AnimatorSetAllBools : MonoBehaviour
13
- {
14
- /// <summary>
15
- ///
16
- /// </summary>
17
- [Tooltip("")]
18
- [SerializeField] protected List<string> boolStrings = new();
19
-
20
-
21
- /// <summary>
22
- ///
23
- /// </summary>
24
- protected Animator animator = null;
25
-
26
-
27
- /// <summary>
28
- ///
29
- /// </summary>
30
- protected virtual void Start() => animator = GetComponent<Animator>();
31
-
32
- /// <summary>
33
- ///
34
- /// </summary>
35
- /// <param name="to"></param>
36
- /// <remarks></remarks>
37
- public virtual void SetAll(bool to)
38
- {
39
- foreach (string s in boolStrings)
40
- animator.SetBool(s, to);
41
- }
42
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.AddOns
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ /// <remarks></remarks>
11
+ [RequireComponent(typeof(Animator))]
12
+ public class AnimatorSetAllBools : MonoBehaviour
13
+ {
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
+ [Tooltip("")]
18
+ [SerializeField] protected List<string> boolStrings = new();
19
+
20
+
21
+ /// <summary>
22
+ ///
23
+ /// </summary>
24
+ protected Animator animator = null;
25
+
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ protected virtual void Start() => animator = GetComponent<Animator>();
31
+
32
+ /// <summary>
33
+ ///
34
+ /// </summary>
35
+ /// <param name="to"></param>
36
+ /// <remarks></remarks>
37
+ public virtual void SetAll(bool to)
38
+ {
39
+ foreach (string s in boolStrings)
40
+ animator.SetBool(s, to);
41
+ }
42
+ }
43
43
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: e5f4cf1ebce17024f80a614e113b9b86
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: e5f4cf1ebce17024f80a614e113b9b86
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,18 +1,18 @@
1
- {
2
- "name": "DREditor.AddOns",
3
- "rootNamespace": "",
4
- "references": [
5
- "Unity.RenderPipelines.Universal.Runtime",
6
- "Unity.TextMeshPro",
7
- "DREditor"
8
- ],
9
- "includePlatforms": [],
10
- "excludePlatforms": [],
11
- "allowUnsafeCode": false,
12
- "overrideReferences": false,
13
- "precompiledReferences": [],
14
- "autoReferenced": true,
15
- "defineConstraints": [],
16
- "versionDefines": [],
17
- "noEngineReferences": false
1
+ {
2
+ "name": "DREditor.AddOns",
3
+ "rootNamespace": "",
4
+ "references": [
5
+ "Unity.RenderPipelines.Universal.Runtime",
6
+ "Unity.TextMeshPro",
7
+ "DREditor"
8
+ ],
9
+ "includePlatforms": [],
10
+ "excludePlatforms": [],
11
+ "allowUnsafeCode": false,
12
+ "overrideReferences": false,
13
+ "precompiledReferences": [],
14
+ "autoReferenced": true,
15
+ "defineConstraints": [],
16
+ "versionDefines": [],
17
+ "noEngineReferences": false
18
18
  }
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: f6dca99f1982af843bfc95a2d3d83643
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: f6dca99f1982af843bfc95a2d3d83643
3
+ AssemblyDefinitionImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -1,60 +1,60 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- // Leothedev helped.
3
- using UnityEngine;
4
- using UnityEngine.Rendering.Universal;
5
-
6
- namespace DREditor.AddOns
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- /// <remarks></remarks>
12
- public class DisableRendererFeature : MonoBehaviour
13
- {
14
- /// <summary>
15
- ///
16
- /// </summary>
17
- [Header("")]
18
-
19
- [Tooltip("")]
20
- [SerializeField] protected UniversalRendererData rendererData = null;
21
-
22
- /// <summary>
23
- ///
24
- /// </summary>
25
- [Tooltip("")]
26
- [SerializeField] protected string featureName = "SSAO";
27
-
28
-
29
- /// <summary>
30
- ///
31
- /// </summary>
32
- protected virtual void Start() => ChangeFeature(featureName, false);
33
-
34
- /// <summary>
35
- ///
36
- /// </summary>
37
- protected virtual void OnDisable() => ChangeFeature(featureName, true);
38
-
39
- /// <summary>
40
- ///
41
- /// </summary>
42
- /// <param name="featureName"></param>
43
- /// <param name="enabledState"></param>
44
- protected virtual void ChangeFeature(string featureName, bool enabledState) => GetFeature(featureName).SetActive(enabledState);
45
-
46
- /// <summary>
47
- ///
48
- /// </summary>
49
- /// <param name="featureName"></param>
50
- /// <returns></returns>
51
- protected virtual ScriptableRendererFeature GetFeature(string featureName)
52
- {
53
- foreach (var feature in rendererData.rendererFeatures)
54
- if (feature != null && feature.name == featureName)
55
- return feature;
56
-
57
- return null;
58
- }
59
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ // Leothedev helped.
3
+ using UnityEngine;
4
+ using UnityEngine.Rendering.Universal;
5
+
6
+ namespace DREditor.AddOns
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ /// <remarks></remarks>
12
+ public class DisableRendererFeature : MonoBehaviour
13
+ {
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
+ [Header("")]
18
+
19
+ [Tooltip("")]
20
+ [SerializeField] protected UniversalRendererData rendererData = null;
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
+ [Tooltip("")]
26
+ [SerializeField] protected string featureName = "SSAO";
27
+
28
+
29
+ /// <summary>
30
+ ///
31
+ /// </summary>
32
+ protected virtual void Start() => ChangeFeature(featureName, false);
33
+
34
+ /// <summary>
35
+ ///
36
+ /// </summary>
37
+ protected virtual void OnDisable() => ChangeFeature(featureName, true);
38
+
39
+ /// <summary>
40
+ ///
41
+ /// </summary>
42
+ /// <param name="featureName"></param>
43
+ /// <param name="enabledState"></param>
44
+ protected virtual void ChangeFeature(string featureName, bool enabledState) => GetFeature(featureName).SetActive(enabledState);
45
+
46
+ /// <summary>
47
+ ///
48
+ /// </summary>
49
+ /// <param name="featureName"></param>
50
+ /// <returns></returns>
51
+ protected virtual ScriptableRendererFeature GetFeature(string featureName)
52
+ {
53
+ foreach (var feature in rendererData.rendererFeatures)
54
+ if (feature != null && feature.name == featureName)
55
+ return feature;
56
+
57
+ return null;
58
+ }
59
+ }
60
60
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 2da86bbb52651f248abe013924b0d71a
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 2da86bbb52651f248abe013924b0d71a
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,34 +1,34 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using TMPro;
3
- using UnityEngine;
4
-
5
- namespace DREditor.AddOns
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- [ClassHeader("")]
11
- public class DisplayBuildVersion : MonoBehaviour
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Tooltip("")]
17
- [SerializeField] protected TextMeshProUGUI versionText;
18
-
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- [Tooltip("")]
23
- [SerializeField] protected string prefix = "v";
24
-
25
-
26
- protected virtual void Start()
27
- {
28
- if (versionText != null)
29
- versionText.text = $"{prefix}{Application.version}";
30
- else
31
- UnityEngine.Debug.LogWarning($"ALERT: {nameof(DisplayBuildVersion)}: No TextMeshProUGUI assigned.");
32
- }
33
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using TMPro;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.AddOns
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [ClassHeader("")]
11
+ public class DisplayBuildVersion : MonoBehaviour
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Tooltip("")]
17
+ [SerializeField] protected TextMeshProUGUI versionText;
18
+
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ [Tooltip("")]
23
+ [SerializeField] protected string prefix = "v";
24
+
25
+
26
+ protected virtual void Start()
27
+ {
28
+ if (versionText != null)
29
+ versionText.text = $"{prefix}{Application.version}";
30
+ else
31
+ UnityEngine.Debug.LogWarning($"ALERT: {nameof(DisplayBuildVersion)}: No TextMeshProUGUI assigned.");
32
+ }
33
+ }
34
34
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: c274aeda7cf9058479754009d0b2df12
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: c274aeda7cf9058479754009d0b2df12
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,29 +1,29 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using UnityEngine;
3
-
4
- namespace DREditor.AddOns
5
- {
6
- /// <summary>
7
- ///
8
- /// </summary>
9
- public class EnableCanvasOnStart : MonoBehaviour
10
- {
11
- /// <summary>
12
- ///
13
- /// </summary>
14
- [Tooltip("")]
15
- [SerializeField] protected Canvas canvas = null;
16
-
17
- /// <summary>
18
- ///
19
- /// </summary>
20
- [Tooltip("")]
21
- [SerializeField] protected bool enableState = true;
22
-
23
-
24
- /// <summary>
25
- ///
26
- /// </summary>
27
- protected virtual void Start() => canvas.enabled = enableState;
28
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.AddOns
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class EnableCanvasOnStart : MonoBehaviour
10
+ {
11
+ /// <summary>
12
+ ///
13
+ /// </summary>
14
+ [Tooltip("")]
15
+ [SerializeField] protected Canvas canvas = null;
16
+
17
+ /// <summary>
18
+ ///
19
+ /// </summary>
20
+ [Tooltip("")]
21
+ [SerializeField] protected bool enableState = true;
22
+
23
+
24
+ /// <summary>
25
+ ///
26
+ /// </summary>
27
+ protected virtual void Start() => canvas.enabled = enableState;
28
+ }
29
29
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: a786827709d4a6844854118002778ba0
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: a786827709d4a6844854118002778ba0
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/EventHolder.cs CHANGED
@@ -1,28 +1,28 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using System.Collections.Generic;
3
- using UnityEngine;
4
- using UnityEngine.Events;
5
-
6
- namespace DREditor.AddOns
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- /// <remarks></remarks>
12
- [ClassHeader("")]
13
- public class EventHolder : MonoBehaviour
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- [Tooltip("")]
19
- [SerializeField] List<UnityEvent> events = new();
20
-
21
-
22
- /// <summary>
23
- ///
24
- /// </summary>
25
- /// <param name="index"></param>
26
- public virtual void InvokeEventAtIndex(int index) => events[index]?.Invoke();
27
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+ using UnityEngine.Events;
5
+
6
+ namespace DREditor.AddOns
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ /// <remarks></remarks>
12
+ [ClassHeader("")]
13
+ public class EventHolder : MonoBehaviour
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Tooltip("")]
19
+ [SerializeField] List<UnityEvent> events = new();
20
+
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
+ /// <param name="index"></param>
26
+ public virtual void InvokeEventAtIndex(int index) => events[index]?.Invoke();
27
+ }
28
28
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 8613a400dc7e9794c92a4cbaec735d55
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 8613a400dc7e9794c92a4cbaec735d55
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,33 +1,33 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using UnityEngine;
3
-
4
- namespace DREditor.AddOns
5
- {
6
- /// <summary>
7
- ///
8
- /// </summary>
9
- public class LightMapSwapper : MonoBehaviour
10
- {
11
- /// <summary>
12
- ///
13
- /// </summary>
14
- [Tooltip("")]
15
- [SerializeField] protected Texture2D lightMap = null;
16
-
17
-
18
- protected virtual void Start() => SetLightMap();
19
-
20
- /// <summary>
21
- ///
22
- /// </summary>
23
- protected virtual void SetLightMap()
24
- {
25
- LightmapData data = new()
26
- {
27
- lightmapColor = lightMap
28
- };
29
-
30
- LightmapSettings.lightmaps = new LightmapData[] { data };
31
- }
32
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.AddOns
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class LightMapSwapper : MonoBehaviour
10
+ {
11
+ /// <summary>
12
+ ///
13
+ /// </summary>
14
+ [Tooltip("")]
15
+ [SerializeField] protected Texture2D lightMap = null;
16
+
17
+
18
+ protected virtual void Start() => SetLightMap();
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ protected virtual void SetLightMap()
24
+ {
25
+ LightmapData data = new()
26
+ {
27
+ lightmapColor = lightMap
28
+ };
29
+
30
+ LightmapSettings.lightmaps = new LightmapData[] { data };
31
+ }
32
+ }
33
33
  }