-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cfa0cb6
Showing
95 changed files
with
13,225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: ⚙ Build and Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
name: ⚙ Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build unitypackage | ||
run: | | ||
echo Assets/extDebug.UGUI.meta >> metaList | ||
find Assets/extDebug.UGUI -name \*.meta >> metaList | ||
- uses: pCYSl5EDgo/create-unitypackage@master | ||
with: | ||
package-path: extDebug.UGUI.unitypackage | ||
include-files: metaList | ||
project-folder: ./ | ||
- name: Semantic release | ||
id: semantic | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
branch: main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update upm branch | ||
run: | | ||
echo '>>> Start' | ||
git log -1 | ||
mkdir Temp | ||
cp README.md Temp/README.md | ||
cp CHANGELOG.md Temp/CHANGELOG.md | ||
cp LICENSE Temp/LICENSE | ||
echo '>>> Delete local upm branch' | ||
git branch -d upm &> /dev/null || echo upm branch not found | ||
echo | ||
echo '>>> Split upm branch' | ||
git subtree split -P "$PKG_ROOT" -b upm | ||
echo | ||
echo '>>> Checkout upm branch' | ||
git checkout upm | ||
cp Temp/README.md README.md | ||
git add README.md | ||
cp Temp/CHANGELOG.md CHANGELOG.md | ||
git add CHANGELOG.md | ||
cp Temp/LICENSE LICENSE | ||
git add LICENSE | ||
if [[ -d "Examples" ]]; then | ||
echo | ||
echo '>>> Examples move to Examples~' | ||
git mv Examples Examples~ | ||
rm -f Examples.meta | ||
fi | ||
git config --global user.name 'github-bot' | ||
git config --global user.email 'github-bot@users.noreply.github.com' | ||
git commit -am "$MSG" | ||
echo | ||
echo '>>> Force overwrite remote upm branch' | ||
git push -f -u origin upm | ||
env: | ||
PKG_ROOT: Assets/extDebug.UGUI | ||
MSG: "chore(release): finalize UPM package" | ||
- name: Create upm git tag | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
git tag $TAG upm | ||
git push origin --tags | ||
env: | ||
TAG: upm/v${{ steps.semantic.outputs.new_release_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# extDebug.UGUI .gitignore file 2021 | ||
|
||
# ------- | ||
# FOLDERS | ||
# ------- | ||
|
||
# Unity | ||
|
||
/[Ll]ibrary/ | ||
/[Tt]emp/ | ||
/[Oo]bj/ | ||
/[Bb]uild/ | ||
/[Bb]uilds/ | ||
/[Ll]ogs/ | ||
/[Uu]serSettings/ | ||
/Assets/AssetStoreTools* | ||
AssetBundles/ | ||
|
||
# TextMeshPro Essentials | ||
Assets/TextMesh Pro.meta | ||
Assets/TextMesh Pro/ | ||
|
||
# Visual Studio | ||
|
||
ExportedObj/ | ||
|
||
# ----- | ||
# FILES | ||
# ----- | ||
|
||
# Unity | ||
|
||
Assembly-CSharp-Editor-vs.csproj | ||
Assembly-CSharp-Editor.csproj | ||
Assembly-CSharp-firstpass-vs.csproj | ||
Assembly-CSharp-firstpass.csproj | ||
Assembly-CSharp-vs.csproj | ||
Assembly-CSharp.csproj | ||
|
||
# Visual Studio / MonoDevelop | ||
|
||
*.sln | ||
*.svd | ||
*.userprefs | ||
*.pidb | ||
*.suo | ||
*.user | ||
*.unityproj | ||
*.booproj | ||
*.csproj | ||
.vscode/ | ||
.vs/ | ||
.idea/ | ||
.vsconfig | ||
|
||
# OS generated | ||
|
||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db | ||
Thumbs.db.meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"tagFormat": "v${version}", | ||
"plugins": [ | ||
["@semantic-release/commit-analyzer", { "preset": "angular" }], | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/changelog", { "preset": "angular" }], | ||
["@semantic-release/npm", { "npmPublish": false, "pkgRoot": "Assets/extDebug.UGUI" }], | ||
["@semantic-release/git", { | ||
"assets": ["Assets/extDebug.UGUI/package.json", "CHANGELOG.md"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}], | ||
["@semantic-release/github", { | ||
"assets": [ | ||
{"path": "extDebug.UGUI.unitypackage", "label": "extDebug.UGUI v${nextRelease.version}"} | ||
] | ||
}] | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DUMMY |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
Assets/extDebug.UGUI/Examples/UGUI.Menu/Example_UGUI_Text.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/* Copyright (c) 2021 dr. ext (Vladimir Sigalkin) */ | ||
|
||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
using System; | ||
|
||
using extDebug.Menu; | ||
using extDebug.Menu.UGUI; | ||
|
||
namespace extDebug.Examples.Menu.UGUI | ||
{ | ||
public class Example_UGUI_Text : MonoBehaviour | ||
{ | ||
#region Internal Types | ||
|
||
private enum ExampleEnums | ||
{ | ||
One, | ||
Two, | ||
Three | ||
} | ||
|
||
[Flags] | ||
private enum ExampleFlags | ||
{ | ||
One = 1 << 0, | ||
Two = 1 << 1, | ||
Three = 1 << 2, | ||
} | ||
|
||
#endregion | ||
|
||
#region Public Vars | ||
|
||
public GameObject MenuObject; | ||
|
||
public Text MenuText; | ||
|
||
#endregion | ||
|
||
#region Private Vars | ||
|
||
private byte _uint8; | ||
|
||
private UInt16 _uint16; | ||
|
||
private UInt32 _uint32; | ||
|
||
private UInt64 _uint64; | ||
|
||
private sbyte _int8; | ||
|
||
private Int16 _int16; | ||
|
||
private Int32 _int32; | ||
|
||
private Int64 _int64; | ||
|
||
private float _float; | ||
|
||
private bool _bool; | ||
|
||
private ExampleEnums _enum; | ||
|
||
private ExampleFlags _flags; | ||
|
||
private object _longContext = new object(); | ||
|
||
private object _infinityContext = new object(); | ||
|
||
#endregion | ||
|
||
#region Unity Methods | ||
|
||
private void Start() | ||
{ | ||
string GetName(Component component) => $"{component.name} ({component.GetType().Name})"; | ||
void ExampleAction(DMAction action) => Debug.Log(action.Data); | ||
|
||
// Initialize UGUI render | ||
DM.Render = new DMUGUIRender(MenuObject, MenuText); | ||
|
||
// Simple Menus | ||
DM.Add("Simple Menus/Action", action => Debug.Log("Hello/Action"), order: 0); | ||
DM.Add("Simple Menus/UInt8", () => _uint8, v => _uint8 = v, order: 1); | ||
DM.Add("Simple Menus/UInt16", () => _uint16, v => _uint16 = v, order: 2); | ||
DM.Add("Simple Menus/UInt32", () => _uint32, v => _uint32 = v, order: 3); | ||
DM.Add("Simple Menus/UInt64", () => _uint64, v => _uint64 = v, order: 4); | ||
DM.Add("Simple Menus/Int8", () => _int8, v => _int8 = v, order: 5); | ||
DM.Add("Simple Menus/Int16", () => _int16, v => _int16 = v, order: 6); | ||
DM.Add("Simple Menus/Int32", () => _int32, v => _int32 = v, order: 7); | ||
DM.Add("Simple Menus/Int64", () => _int64, v => _int64 = v, order: 8); | ||
DM.Add("Simple Menus/Float", () => _float, v => _float = v, order: 9).SetPrecision(2); | ||
DM.Add("Simple Menus/Bool", () => _bool, v => _bool = v, order: 10); | ||
DM.Add("Simple Menus/Enum", () => _enum, v => _enum = v, order: 11); | ||
DM.Add("Simple Menus/Flags", () => _flags, v => _flags = v, order: 12); | ||
|
||
// Requests Menus | ||
// DMBranchRequest | ||
var branch = DM.Add("Requests Menus/Branch", order: 0).Add(FindObjectsOfType<Component>, GetName); | ||
branch.Add("Debug.Log", action => { Debug.Log(action.Data); }); | ||
branch.Add("Object.Destroy", action => { Destroy((Component)action.Data); }); | ||
|
||
// DMActionRequest | ||
DM.Add("Requests Menus/Actions", order: 1).Add(FindObjectsOfType<Component>, ExampleAction); | ||
|
||
DM.Open(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/extDebug.UGUI/Examples/UGUI.Menu/Example_UGUI_Text.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.