net.dreditor.flairs 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.
- package/.attestation.p7m +0 -0
- package/DREditor.Flairs.asmdef +18 -18
- package/DREditor.Flairs.asmdef.meta +7 -7
- package/DestroyFlairHandler.cs +89 -89
- package/DestroyFlairHandler.cs.meta +1 -1
- package/DestroyFlairOnDirectorComplete.cs +73 -73
- package/DestroyFlairOnDirectorComplete.cs.meta +11 -11
- package/DestroyFlairOnNextLine.cs +77 -77
- package/DestroyFlairOnNextLine.cs.meta +1 -1
- package/Editor/AllCharactersOption.cs +42 -42
- package/Editor/AllCharactersOption.cs.meta +1 -1
- package/Editor/AllFlairsOneCharacterOption.cs +46 -46
- package/Editor/AllFlairsOneCharacterOption.cs.meta +1 -1
- package/Editor/AllSpritesOption.cs +53 -53
- package/Editor/AllSpritesOption.cs.meta +1 -1
- package/Editor/DREditor.Flairs.Editor.asmdef +17 -17
- package/Editor/DREditor.Flairs.Editor.asmdef.meta +7 -7
- package/Editor/FlairEditorTools.cs +86 -86
- package/Editor/FlairEditorTools.cs.meta +1 -1
- package/Editor/GenerateFlairDebugDialogue.cs +61 -61
- package/Editor/GenerateFlairDebugDialogue.cs.meta +1 -1
- package/Editor/GenerateFlairDialogueOptionBase.cs +111 -111
- package/Editor/GenerateFlairDialogueOptionBase.cs.meta +1 -1
- package/Editor/IGenerateFlairDialogueSetting.cs +18 -18
- package/Editor/IGenerateFlairDialogueSetting.cs.meta +1 -1
- package/Editor.meta +8 -8
- package/EnableFlairCanvas.cs +77 -77
- package/EnableFlairCanvas.cs.meta +1 -1
- package/FadeFlairDestroyer.cs +58 -58
- package/FadeFlairDestroyer.cs.meta +1 -1
- package/Flair.cs +31 -31
- package/Flair.cs.meta +1 -1
- package/FlairDestroyer.cs +26 -26
- package/FlairDestroyer.cs.meta +1 -1
- package/FlairEvent.cs +45 -45
- package/FlairEvent.cs.meta +1 -1
- package/FlairEventHandler.cs +33 -33
- package/FlairEventHandler.cs.meta +1 -1
- package/FlairOffset.cs +47 -47
- package/FlairOffset.cs.meta +1 -1
- package/FlairSpawner.cs +28 -28
- package/FlairSpawner.cs.meta +1 -1
- package/FlairSpawnerBase.cs +16 -16
- package/FlairSpawnerBase.cs.meta +1 -1
- package/FlairStrategy.cs +48 -48
- package/FlairStrategy.cs.meta +1 -1
- package/FlairStrategyBase.cs +57 -57
- package/FlairStrategyBase.cs.meta +1 -1
- package/Flair_Question.controller +72 -72
- package/Flair_Question.controller.meta +8 -8
- package/Flair_QuestionAnim.anim +693 -693
- package/Flair_QuestionAnim.anim.meta +8 -8
- package/Flair_QuestionTimeline.playable +2198 -2198
- package/Flair_QuestionTimeline.playable.meta +8 -8
- package/IFlair.cs +16 -16
- package/IFlair.cs.meta +1 -1
- package/IFlairDestroyable.cs +15 -15
- package/IFlairDestroyable.cs.meta +1 -1
- package/IFlairEvent.cs +29 -29
- package/IFlairEvent.cs.meta +1 -1
- package/IFlairSetting.cs +16 -16
- package/IFlairSetting.cs.meta +1 -1
- package/IFlairSpawnStep.cs +17 -17
- package/IFlairSpawnStep.cs.meta +1 -1
- package/IFlairStep.cs +17 -17
- package/IFlairStep.cs.meta +1 -1
- package/LayerFlair.cs +38 -38
- package/LayerFlair.cs.meta +1 -1
- package/ProtagFlairStrategy.cs +68 -68
- package/ProtagFlairStrategy.cs.meta +1 -1
- package/{Samples → Samples~}/Flair.prefab +145 -145
- package/{Samples → Samples~}/Flair.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Event_Handler.prefab +238 -238
- package/{Samples → Samples~}/Flair_Event_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Question.asset +15 -15
- package/{Samples → Samples~}/Flair_Question.asset.meta +8 -8
- package/{Samples → Samples~}/Flair_Question.prefab +412 -412
- package/{Samples → Samples~}/Flair_Question.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Strategy.prefab +64 -64
- package/{Samples → Samples~}/Flair_Strategy.prefab.meta +7 -7
- package/{Samples → Samples~}/Protag_Flair_Strategy.prefab +186 -186
- package/{Samples → Samples~}/Protag_Flair_Strategy.prefab.meta +7 -7
- package/SpawnFlairOnHead.cs +36 -36
- package/SpawnFlairOnHead.cs.meta +1 -1
- package/SpawnFlairOnParent.cs +24 -24
- package/SpawnFlairOnParent.cs.meta +1 -1
- package/SpawnFlairStepBase.cs +44 -44
- package/SpawnFlairStepBase.cs.meta +1 -1
- package/SpawnFlairToParent.cs +38 -38
- package/SpawnFlairToParent.cs.meta +1 -1
- package/package.json +41 -36
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using DREditor.Characters;
|
|
4
|
-
using DREditor.Dialogues;
|
|
5
|
-
using DREditor.Editor.Utility;
|
|
6
|
-
using System;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.Flairs.Editor
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[Serializable]
|
|
15
|
-
public class AllFlairsOneCharacterOption : GenerateFlairDialogueOptionBase
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected int speakerNumber = -1;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/// <inheritdoc/>
|
|
25
|
-
protected override void GenerateDialogue() => AllFlairsOneCharacter();
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
///
|
|
29
|
-
/// </summary>
|
|
30
|
-
protected virtual void AllFlairsOneCharacter()
|
|
31
|
-
{
|
|
32
|
-
Dialogue dia = MakeInstance<Dialogue>();
|
|
33
|
-
|
|
34
|
-
dia.Lines.Clear();
|
|
35
|
-
|
|
36
|
-
dia.name = "D_" + cdb.Characters[speakerNumber].FirstName + "_All_Flairs_Debug";
|
|
37
|
-
|
|
38
|
-
Character speaker = cdb.Characters[speakerNumber];
|
|
39
|
-
|
|
40
|
-
foreach (var f in events)
|
|
41
|
-
dia.Lines.Add(CharacterFlairLine(speaker, f, f.GetFlair().GetPrefab().name));
|
|
42
|
-
|
|
43
|
-
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using DREditor.Characters;
|
|
4
|
+
using DREditor.Dialogues;
|
|
5
|
+
using DREditor.Editor.Utility;
|
|
6
|
+
using System;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.Flairs.Editor
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[Serializable]
|
|
15
|
+
public class AllFlairsOneCharacterOption : GenerateFlairDialogueOptionBase
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected int speakerNumber = -1;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/// <inheritdoc/>
|
|
25
|
+
protected override void GenerateDialogue() => AllFlairsOneCharacter();
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
protected virtual void AllFlairsOneCharacter()
|
|
31
|
+
{
|
|
32
|
+
Dialogue dia = MakeInstance<Dialogue>();
|
|
33
|
+
|
|
34
|
+
dia.Lines.Clear();
|
|
35
|
+
|
|
36
|
+
dia.name = "D_" + cdb.Characters[speakerNumber].FirstName + "_All_Flairs_Debug";
|
|
37
|
+
|
|
38
|
+
Character speaker = cdb.Characters[speakerNumber];
|
|
39
|
+
|
|
40
|
+
foreach (var f in events)
|
|
41
|
+
dia.Lines.Add(CharacterFlairLine(speaker, f, f.GetFlair().GetPrefab().name));
|
|
42
|
+
|
|
43
|
+
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
47
|
#endif
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: ce79a1f0ae2abab45af4b64c067c71b2
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using DREditor.Characters;
|
|
4
|
-
using DREditor.Dialogues;
|
|
5
|
-
using DREditor.Editor.Utility;
|
|
6
|
-
using System;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.Flairs.Editor
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[Serializable]
|
|
15
|
-
public class AllSpritesOption : GenerateFlairDialogueOptionBase
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected int speakerNumber = -1;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/// <inheritdoc/>
|
|
25
|
-
protected override void GenerateDialogue()
|
|
26
|
-
{
|
|
27
|
-
foreach (IFlairEvent sceneEvent in events)
|
|
28
|
-
OneCharacterAllSprites(sceneEvent);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/// <summary>
|
|
32
|
-
///
|
|
33
|
-
/// </summary>
|
|
34
|
-
/// <param name="flair"></param>
|
|
35
|
-
protected virtual void OneCharacterAllSprites(IFlairEvent flair)
|
|
36
|
-
{
|
|
37
|
-
Dialogue dia = MakeInstance<Dialogue>();
|
|
38
|
-
|
|
39
|
-
dia.Lines.Clear();
|
|
40
|
-
|
|
41
|
-
string flairName = flair.GetFlair().GetPrefab().name;
|
|
42
|
-
|
|
43
|
-
dia.name = "D_" + cdb.Characters[speakerNumber].FirstName + "_All_Sprites_" + flairName + "_Debug";
|
|
44
|
-
|
|
45
|
-
Character speaker = cdb.Characters[speakerNumber];
|
|
46
|
-
|
|
47
|
-
for (int i = 0; i < speaker.Sprites.Count; i++)
|
|
48
|
-
dia.Lines.Add(CharacterFlairLine(speaker, flair, flairName, i));
|
|
49
|
-
|
|
50
|
-
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using DREditor.Characters;
|
|
4
|
+
using DREditor.Dialogues;
|
|
5
|
+
using DREditor.Editor.Utility;
|
|
6
|
+
using System;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.Flairs.Editor
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[Serializable]
|
|
15
|
+
public class AllSpritesOption : GenerateFlairDialogueOptionBase
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected int speakerNumber = -1;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/// <inheritdoc/>
|
|
25
|
+
protected override void GenerateDialogue()
|
|
26
|
+
{
|
|
27
|
+
foreach (IFlairEvent sceneEvent in events)
|
|
28
|
+
OneCharacterAllSprites(sceneEvent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
/// <param name="flair"></param>
|
|
35
|
+
protected virtual void OneCharacterAllSprites(IFlairEvent flair)
|
|
36
|
+
{
|
|
37
|
+
Dialogue dia = MakeInstance<Dialogue>();
|
|
38
|
+
|
|
39
|
+
dia.Lines.Clear();
|
|
40
|
+
|
|
41
|
+
string flairName = flair.GetFlair().GetPrefab().name;
|
|
42
|
+
|
|
43
|
+
dia.name = "D_" + cdb.Characters[speakerNumber].FirstName + "_All_Sprites_" + flairName + "_Debug";
|
|
44
|
+
|
|
45
|
+
Character speaker = cdb.Characters[speakerNumber];
|
|
46
|
+
|
|
47
|
+
for (int i = 0; i < speaker.Sprites.Count; i++)
|
|
48
|
+
dia.Lines.Add(CharacterFlairLine(speaker, flair, flairName, i));
|
|
49
|
+
|
|
50
|
+
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
#endif
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: af1319c3e898a7c48aea965bde983acf
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.Flairs.Editor",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"DREditor.Flairs",
|
|
6
|
-
"DREditor",
|
|
7
|
-
"DREditor.Editor"
|
|
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.Flairs.Editor",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"DREditor.Flairs",
|
|
6
|
+
"DREditor",
|
|
7
|
+
"DREditor.Editor"
|
|
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: cd0c130aed3b2534bb7d5f287ac0f8de
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: cd0c130aed3b2534bb7d5f287ac0f8de
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using DREditor.Editor.Utility;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using System.Linq;
|
|
6
|
-
using UnityEditor;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.Flairs.Editor
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
public static class FlairEditorTools
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[MenuItem("DREditor/Flair/Create Flairs From Selected Objects")]
|
|
20
|
-
public static void CreateFlairsFromSelectedObjects()
|
|
21
|
-
{
|
|
22
|
-
if (NoSelectedScriptableObjects(out IEnumerable<GameObject> objects))
|
|
23
|
-
return;
|
|
24
|
-
|
|
25
|
-
AssetDatabase.StartAssetEditing();
|
|
26
|
-
|
|
27
|
-
try
|
|
28
|
-
{
|
|
29
|
-
CreateFlairs(objects);
|
|
30
|
-
}
|
|
31
|
-
finally
|
|
32
|
-
{
|
|
33
|
-
AssetDatabase.StopAssetEditing();
|
|
34
|
-
|
|
35
|
-
AssetDatabase.SaveAssets();
|
|
36
|
-
|
|
37
|
-
AssetDatabase.Refresh();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
UnityEngine.Debug.Log("REPORT: Process completed.");
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
/// <param name="objects"></param>
|
|
47
|
-
private static void CreateFlairs(IEnumerable<GameObject> objects)
|
|
48
|
-
{
|
|
49
|
-
foreach (var obj in objects)
|
|
50
|
-
if (obj is GameObject prefab)
|
|
51
|
-
CreateFlair(prefab);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/// <summary>
|
|
55
|
-
///
|
|
56
|
-
/// </summary>
|
|
57
|
-
/// <param name="prefab"></param>
|
|
58
|
-
private static void CreateFlair(GameObject prefab)
|
|
59
|
-
{
|
|
60
|
-
var instance = CustomEditorUtility.CreateAsset<Flair>();
|
|
61
|
-
|
|
62
|
-
instance.name = prefab.name;
|
|
63
|
-
|
|
64
|
-
instance.SetPrefab(prefab);
|
|
65
|
-
|
|
66
|
-
EditorUtility.SetDirty(instance);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/// <summary>
|
|
70
|
-
///
|
|
71
|
-
/// </summary>
|
|
72
|
-
/// <param name="objects"></param>
|
|
73
|
-
/// <returns></returns>
|
|
74
|
-
private static bool NoSelectedScriptableObjects(out IEnumerable<GameObject> objects)
|
|
75
|
-
{
|
|
76
|
-
objects = Selection.objects.OfType<GameObject>();
|
|
77
|
-
|
|
78
|
-
bool result = objects.Count() == 0;
|
|
79
|
-
|
|
80
|
-
if (result)
|
|
81
|
-
UnityEngine.Debug.LogWarning("ALERT: Process likely aborted since no scriptable objects were selected.");
|
|
82
|
-
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using DREditor.Editor.Utility;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using System.Linq;
|
|
6
|
+
using UnityEditor;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.Flairs.Editor
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
public static class FlairEditorTools
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[MenuItem("DREditor/Flair/Create Flairs From Selected Objects")]
|
|
20
|
+
public static void CreateFlairsFromSelectedObjects()
|
|
21
|
+
{
|
|
22
|
+
if (NoSelectedScriptableObjects(out IEnumerable<GameObject> objects))
|
|
23
|
+
return;
|
|
24
|
+
|
|
25
|
+
AssetDatabase.StartAssetEditing();
|
|
26
|
+
|
|
27
|
+
try
|
|
28
|
+
{
|
|
29
|
+
CreateFlairs(objects);
|
|
30
|
+
}
|
|
31
|
+
finally
|
|
32
|
+
{
|
|
33
|
+
AssetDatabase.StopAssetEditing();
|
|
34
|
+
|
|
35
|
+
AssetDatabase.SaveAssets();
|
|
36
|
+
|
|
37
|
+
AssetDatabase.Refresh();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
UnityEngine.Debug.Log("REPORT: Process completed.");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
/// <param name="objects"></param>
|
|
47
|
+
private static void CreateFlairs(IEnumerable<GameObject> objects)
|
|
48
|
+
{
|
|
49
|
+
foreach (var obj in objects)
|
|
50
|
+
if (obj is GameObject prefab)
|
|
51
|
+
CreateFlair(prefab);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
///
|
|
56
|
+
/// </summary>
|
|
57
|
+
/// <param name="prefab"></param>
|
|
58
|
+
private static void CreateFlair(GameObject prefab)
|
|
59
|
+
{
|
|
60
|
+
var instance = CustomEditorUtility.CreateAsset<Flair>();
|
|
61
|
+
|
|
62
|
+
instance.name = prefab.name;
|
|
63
|
+
|
|
64
|
+
instance.SetPrefab(prefab);
|
|
65
|
+
|
|
66
|
+
EditorUtility.SetDirty(instance);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
///
|
|
71
|
+
/// </summary>
|
|
72
|
+
/// <param name="objects"></param>
|
|
73
|
+
/// <returns></returns>
|
|
74
|
+
private static bool NoSelectedScriptableObjects(out IEnumerable<GameObject> objects)
|
|
75
|
+
{
|
|
76
|
+
objects = Selection.objects.OfType<GameObject>();
|
|
77
|
+
|
|
78
|
+
bool result = objects.Count() == 0;
|
|
79
|
+
|
|
80
|
+
if (result)
|
|
81
|
+
UnityEngine.Debug.LogWarning("ALERT: Process likely aborted since no scriptable objects were selected.");
|
|
82
|
+
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
87
|
#endif
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 2cbd96e34561e454e945d84ae73adb84
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using UnityEditor;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Flairs.Editor
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
public class GenerateFlairDebugDialogue : ScriptableWizard
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Header("")]
|
|
19
|
-
[Divider]
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeReference, SelectType]
|
|
22
|
-
[SerializeField] protected IGenerateFlairDialogueSetting activeSetting;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
[Header("")]
|
|
29
|
-
[Tooltip("")]
|
|
30
|
-
[SerializeReference, SelectType]
|
|
31
|
-
[SerializeField] protected List<IFlairEvent> events = new();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
[MenuItem("DREditor/Flair/Generate Flair Debug Dialogue")]
|
|
38
|
-
public static void GenerateFlairDialogueWizard() => DisplayWizard<GenerateFlairDebugDialogue>("Flair Dialogue Wizard", "Create");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
protected virtual void OnWizardCreate()
|
|
42
|
-
{
|
|
43
|
-
AssetDatabase.StartAssetEditing();
|
|
44
|
-
|
|
45
|
-
try
|
|
46
|
-
{
|
|
47
|
-
activeSetting?.ExecuteOption(events);
|
|
48
|
-
}
|
|
49
|
-
catch (Exception exception)
|
|
50
|
-
{
|
|
51
|
-
UnityEngine.Debug.LogException(exception);
|
|
52
|
-
}
|
|
53
|
-
finally
|
|
54
|
-
{
|
|
55
|
-
AssetDatabase.StopAssetEditing();
|
|
56
|
-
|
|
57
|
-
AssetDatabase.SaveAssets();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using UnityEditor;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Flairs.Editor
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class GenerateFlairDebugDialogue : ScriptableWizard
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Header("")]
|
|
19
|
+
[Divider]
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeReference, SelectType]
|
|
22
|
+
[SerializeField] protected IGenerateFlairDialogueSetting activeSetting;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
[Header("")]
|
|
29
|
+
[Tooltip("")]
|
|
30
|
+
[SerializeReference, SelectType]
|
|
31
|
+
[SerializeField] protected List<IFlairEvent> events = new();
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
[MenuItem("DREditor/Flair/Generate Flair Debug Dialogue")]
|
|
38
|
+
public static void GenerateFlairDialogueWizard() => DisplayWizard<GenerateFlairDebugDialogue>("Flair Dialogue Wizard", "Create");
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
protected virtual void OnWizardCreate()
|
|
42
|
+
{
|
|
43
|
+
AssetDatabase.StartAssetEditing();
|
|
44
|
+
|
|
45
|
+
try
|
|
46
|
+
{
|
|
47
|
+
activeSetting?.ExecuteOption(events);
|
|
48
|
+
}
|
|
49
|
+
catch (Exception exception)
|
|
50
|
+
{
|
|
51
|
+
UnityEngine.Debug.LogException(exception);
|
|
52
|
+
}
|
|
53
|
+
finally
|
|
54
|
+
{
|
|
55
|
+
AssetDatabase.StopAssetEditing();
|
|
56
|
+
|
|
57
|
+
AssetDatabase.SaveAssets();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
62
|
#endif
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 9108f14727a2e0949be30b117ad8c7c8
|