Skip to content

Commit 7d07388

Browse files
Init
0 parents  commit 7d07388

17 files changed

Lines changed: 1182 additions & 0 deletions
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release on Tag
2+
on:
3+
push:
4+
tags:
5+
- '*' # match any tag
6+
permissions:
7+
contents: write
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Extract tag version
17+
id: tag
18+
run: |
19+
TAG_NAME="${GITHUB_REF#refs/tags/}"
20+
TAG_VERSION="$TAG_NAME"
21+
echo "Tag name: $TAG_NAME"
22+
echo "Tag version: $TAG_VERSION"
23+
echo "tag_name=$TAG_NAME" >> "$GITHUB_OUTPUT"
24+
echo "tag_version=$TAG_VERSION" >> "$GITHUB_OUTPUT"
25+
- name: Read package.json version
26+
id: pkg
27+
run: |
28+
PKG_VERSION=$(jq -r '.version' package.json)
29+
if [ -z "$PKG_VERSION" ] || [ "$PKG_VERSION" = "null" ]; then
30+
echo "::error::Could not read version from package.json"
31+
exit 1
32+
fi
33+
echo "package.json version: $PKG_VERSION"
34+
echo "pkg_version=$PKG_VERSION" >> "$GITHUB_OUTPUT"
35+
- name: Verify tag matches package.json version
36+
run: |
37+
if [ "${{ steps.tag.outputs.tag_version }}" != "${{ steps.pkg.outputs.pkg_version }}" ]; then
38+
echo "::error::Tag version does not match package.json"
39+
echo "Tag: ${{ steps.tag.outputs.tag_version }}"
40+
echo "package.json: ${{ steps.pkg.outputs.pkg_version }}"
41+
exit 1
42+
fi
43+
- name: Ensure release does not already exist
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
run: |
47+
if gh release view "${{ steps.tag.outputs.tag_name }}" >/dev/null 2>&1; then
48+
echo "::error::Release already exists for this tag"
49+
exit 1
50+
fi
51+
- name: Create VPM package zip
52+
run: |
53+
PKG_NAME=$(jq -r '.name' package.json)
54+
VERSION=$(jq -r '.version' package.json)
55+
ZIP_NAME="${PKG_NAME}-${VERSION}.zip"
56+
echo "Creating $ZIP_NAME"
57+
zip -r "$ZIP_NAME" package.json Runtime/ Editor/ Resources/ -x "*.meta"
58+
echo "ZIP_NAME=$ZIP_NAME" >> "$GITHUB_ENV"
59+
- name: Create GitHub Release and Upload Assets
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
tag_name: ${{ steps.tag.outputs.tag_name }}
63+
name: Release ${{ steps.tag.outputs.tag_name }}
64+
generate_release_notes: true
65+
files: |
66+
${{ env.ZIP_NAME }}
67+
- name: Trigger workflow in another repo
68+
uses: peter-evans/repository-dispatch@v2
69+
with:
70+
token: ${{ secrets.VPM_KEY }}
71+
repository: BitforgedVR/VPM
72+
event-type: build-repo-listing
73+
client-payload: '{"ref": "${{ github.ref }}"}'

.gitignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
#
3+
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Mm]emoryCaptures/
12+
ProjectSettings/*
13+
.idea/*
14+
Packages/*
15+
16+
# Asset meta data should only be ignored when the corresponding asset is also ignored
17+
!/[Aa]ssets/**/*.meta
18+
19+
# Uncomment this line if you wish to ignore the asset store tools plugin
20+
# /[Aa]ssets/AssetStoreTools*
21+
22+
# Autogenerated Jetbrains Rider plugin
23+
[Aa]ssets/Plugins/Editor/JetBrains*
24+
25+
# Visual Studio cache directory
26+
.vs/
27+
28+
# Gradle cache directory
29+
.gradle/
30+
31+
# Autogenerated VS/MD/Consulo solution and project files
32+
ExportedObj/
33+
.consulo/
34+
*.csproj
35+
*.unityproj
36+
*.sln
37+
*.suo
38+
*.tmp
39+
*.user
40+
*.userprefs
41+
*.pidb
42+
*.booproj
43+
*.svd
44+
*.pdb
45+
*.mdb
46+
*.opendb
47+
*.VC.db
48+
49+
# Unity3D generated meta files
50+
*.pidb.meta
51+
*.pdb.meta
52+
*.mdb.meta
53+
54+
# Unity3D generated file on crash reports
55+
sysinfo.txt
56+
57+
# Builds
58+
*.apk
59+
*.unitypackage
60+
61+
# Crashlytics generated file
62+
crashlytics-build.properties
63+

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Changelog
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6+
7+
## [Unreleased]
8+
9+
## [1.2.0] - 2021.10.12
10+
Minimum Unity Version is 2018.3
11+
12+
### Added
13+
- Option to draw a toggle to (de-)activate a GameObject, by [@krisrok](https://github.com/krisrok)
14+
- Support for PrefabStage, for consistent drawing in the "edit prefab" view, by [@krisrok](https://github.com/krisrok)
15+
16+
### Changed
17+
- The HierarchyData.asset can now be stored outside "EditorDefaultResources" folder as well, by [@shreyanshanchlia](https://github.com/shreyanshanchlia)
18+
19+
## [1.1.0] - Package Manager support - 2020.11.12
20+
### Added
21+
- Package Manager support, by [@pdcprod](https://github.com/pdcprod).
22+
- Package information for the Unity's Package Manager.
23+
- Option to stop updating the hierarchy inside Unity's PlayMode (to improve performance).
24+
25+
### Fixed
26+
- Drawing the hierarchy when the first scene is unloaded, by [@rtauziac](https://github.com/rtauziac)
27+
28+
### Changed
29+
- Moved scripts inside "Editor" folder to respect the [Package Layout rules](https://docs.unity3d.com/2020.1/Documentation/Manual/cus-layout.html).
30+
31+
### Removed
32+
- Examples folder and EditorDefault resources.
33+
34+
## [1.0.0] - First Release - 2020.10.20
35+
First Release.

CHANGELOG.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "Febucci.HierarchyIcons",
3+
"references": [],
4+
"includePlatforms": [
5+
"Editor"
6+
],
7+
"excludePlatforms": [],
8+
"allowUnsafeCode": false,
9+
"overrideReferences": false,
10+
"precompiledReferences": [],
11+
"autoReferenced": false,
12+
"defineConstraints": [],
13+
"versionDefines": [],
14+
"noEngineReferences": false
15+
}

Editor/Febucci.CustomHierarchy.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/HierarchyData.cs

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
using UnityEditor;
2+
using UnityEngine;
3+
4+
namespace Febucci.HierarchyData
5+
{
6+
public class HierarchyData : ScriptableObject
7+
{
8+
public bool enabled = true;
9+
10+
public bool updateInPlayMode = true;
11+
12+
public bool drawActivationToggle = true;
13+
14+
#region Icons Data
15+
16+
[System.Serializable]
17+
public class IconsData
18+
{
19+
public bool enabled = true;
20+
[System.Serializable]
21+
public struct HierarchyElement
22+
{
23+
[SerializeField] public Texture2D iconToDraw;
24+
[SerializeField] public MonoScript[] targetClasses;
25+
}
26+
27+
public bool aligned = false;
28+
public HierarchyElement[] pairs = new HierarchyElement[0];
29+
}
30+
31+
public IconsData icons;
32+
33+
#endregion
34+
35+
#region PrefabsData
36+
37+
[System.Serializable]
38+
public class PrefabsData
39+
{
40+
public bool enabled;
41+
42+
[System.Serializable]
43+
public class Prefab
44+
{
45+
public GameObject gameObject;
46+
public Color color;
47+
}
48+
49+
public Prefab[] prefabs = new Prefab[0];
50+
}
51+
52+
public PrefabsData prefabsData;
53+
54+
55+
#endregion
56+
57+
#region Alternating Lines
58+
59+
[System.Serializable]
60+
public class AlternatingBGData
61+
{
62+
public bool enabled = true;
63+
public Color color = new Color(0,0,0, .08f);
64+
}
65+
66+
public AlternatingBGData alternatingBackground;
67+
68+
#endregion
69+
70+
#region SeparatorData
71+
72+
[System.Serializable]
73+
public class SeparatorData
74+
{
75+
public bool enabled = true;
76+
public string startString = ">";
77+
public Color color = new Color(0, 1,1, .15f);
78+
}
79+
80+
public SeparatorData separator;
81+
82+
#endregion
83+
84+
#region Tree
85+
86+
[System.Serializable]
87+
public class TreeData
88+
{
89+
public bool enabled = true;
90+
public bool drawOverlayOnColoredPrefabs = true;
91+
[Range(0,3)] public float dividerHeigth = 1;
92+
public Color baseLevelColor = Color.gray;
93+
94+
[System.Serializable]
95+
public class BranchGroup
96+
{
97+
public Color overlayColor;
98+
public Color[] colors = new Color[0];
99+
}
100+
101+
[Space]
102+
public BranchGroup[] branches = new[]
103+
{
104+
new BranchGroup()
105+
{
106+
overlayColor = new Color(1f, 0.44f, 0.97f, .04f),
107+
colors = new []
108+
{
109+
new Color(1f, 0.44f, 0.97f),
110+
new Color(0.56f, 0.44f, 1f),
111+
new Color(0.44f, 0.71f, 1f),
112+
new Color(0.19f, 0.53f, 0.78f)
113+
}
114+
},
115+
116+
new BranchGroup()
117+
{
118+
overlayColor = new Color(0.93f, 1f, 0.42f, .04f),
119+
colors = new []
120+
{
121+
new Color(0.93f, 1f, 0.42f),
122+
new Color(1f, 0.75f, 0.42f),
123+
new Color(1f, 0.46f, 0.31f),
124+
new Color(1f, 0.35f, 0.34f)
125+
}
126+
}
127+
};
128+
}
129+
130+
public TreeData tree;
131+
132+
133+
#endregion
134+
135+
private void OnValidate()
136+
{
137+
HierarchyDrawer.Initialize();
138+
}
139+
}
140+
}

Editor/HierarchyData.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)