Skip to content

Commit

Permalink
feat: add more script templates (#13)
Browse files Browse the repository at this point in the history
* update entities package

* add new script templates, update orders

* update project script templates

* add property drawer and property attribute templates

* update project templates

* update readme
  • Loading branch information
joaoborks authored Aug 24, 2023
1 parent ea848cc commit fb16353
Show file tree
Hide file tree
Showing 71 changed files with 387 additions and 65 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#SIGNATURE#using UnityEngine;

#NAMESPACE#public class #SCRIPTNAME# : StateMachineBehaviour
{
# #public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#SIGNATURE#using UnityEngine;

#NAMESPACE#public class #SCRIPTNAME# : PropertyAttribute
{
# #public #SCRIPTNAME#()
# #{
# ## #
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#SIGNATURE#using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;

#NAMESPACE#[CustomEditor(typeof(#SCRIPTNAME#/*Replace with target class name*/))]
public class #SCRIPTNAME# : Editor
{
# #public override VisualElement CreateInspectorGUI()
# #{
# ## #var root = new VisualElement();
# ## #return root;
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#SIGNATURE#using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;

#NAMESPACE#public class #SCRIPTNAME# : EditorWindow
{
# #[MenuItem("Window/#SCRIPTNAME#")]
# #public static void ShowEditor()
# #{
# ## #var window = GetWindow<#SCRIPTNAME#>();
# ## #window.titleContent = new GUIContent(nameof(#SCRIPTNAME#));
# #}

# #public void CreateGUI()
# #{
# ## #var root = rootVisualElement;
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#SIGNATURE#using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;

#NAMESPACE#[CustomPropertyDrawer(typeof(#SCRIPTNAME#/*Replace with target class name*/))]
public class #SCRIPTNAME# : PropertyDrawer
{
# #public override VisualElement CreatePropertyGUI(SerializedProperty property)
# #{
# ## #var root = new VisualElement();
# ## #return root;
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#SIGNATURE#using UnityEngine;
using UnityEngine.UIElements;
using System.Collections.Generic;

#NAMESPACE#public class #SCRIPTNAME# : VisualElement
{
# #public new class UxmlFactory : UxmlFactory<#SCRIPTNAME#, UxmlTraits> {}

# #public new class UxmlTraits : VisualElement.UxmlTraits
# #{
# ## #public override IEnumerable<UxmlChildElementDescription> uxmlChildElementsDescription
# ## #{
# ## ## #get
# ## ## #{
# ## ## ## #yield return new UxmlChildElementDescription(typeof(VisualElement));
# ## ## #}
# ## #}

# ## #public override void Init(VisualElement element, IUxmlAttributes bag, CreationContext context)
# ## #{
# ## ## #base.Init(element, bag, context);
# ## #}
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.unity.entities": "1.0.0-pre.65",
"com.unity.entities": "1.0.14",
"com.unity.feature.development": "1.0.1",
"com.unity.ide.visualstudio": "2.0.20",
"com.unity.ugui": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#SIGNATURE#using UnityEngine;

#NAMESPACE#public class #SCRIPTNAME# : StateMachineBehaviour
{
# #public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}

# #public override void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
# #{
# ## #
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#SIGNATURE#using UnityEngine;

#NAMESPACE#public class #SCRIPTNAME# : PropertyAttribute
{
# #public #SCRIPTNAME#()
# #{
# ## #
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#SIGNATURE#using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;

#NAMESPACE#[CustomEditor(typeof(#SCRIPTNAME#/*Replace with target class name*/))]
public class #SCRIPTNAME# : Editor
{
# #public override VisualElement CreateInspectorGUI()
# #{
# ## #var root = new VisualElement();
# ## #return root;
# #}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#SIGNATURE#using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;

#NAMESPACE#public class #SCRIPTNAME# : EditorWindow
{
# #[MenuItem("Window/#SCRIPTNAME#")]
# #public static void ShowEditor()
# #{
# ## #var window = GetWindow<#SCRIPTNAME#>();
# ## #window.titleContent = new GUIContent(nameof(#SCRIPTNAME#));
# #}

# #public void CreateGUI()
# #{
# ## #var root = rootVisualElement;
# #}
}
Loading

0 comments on commit fb16353

Please sign in to comment.