Skip to content

Commit 9fca709

Browse files
committed
Init
0 parents  commit 9fca709

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1233
-0
lines changed

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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/main/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Uu]ser[Ss]ettings/
12+
13+
# MemoryCaptures can get excessive in size.
14+
# They also could contain extremely sensitive data
15+
/[Mm]emoryCaptures/
16+
17+
# Recordings can get excessive in size
18+
/[Rr]ecordings/
19+
20+
# Uncomment this line if you wish to ignore the asset store tools plugin
21+
# /[Aa]ssets/AssetStoreTools*
22+
23+
# Autogenerated Jetbrains Rider plugin
24+
/[Aa]ssets/Plugins/Editor/JetBrains*
25+
26+
# Visual Studio cache directory
27+
.vs/
28+
29+
# Gradle cache directory
30+
.gradle/
31+
32+
# Autogenerated VS/MD/Consulo solution and project files
33+
ExportedObj/
34+
.consulo/
35+
*.csproj
36+
*.unityproj
37+
*.sln
38+
*.suo
39+
*.tmp
40+
*.user
41+
*.userprefs
42+
*.pidb
43+
*.booproj
44+
*.svd
45+
*.pdb
46+
*.mdb
47+
*.opendb
48+
*.VC.db
49+
50+
# Unity3D generated meta files
51+
*.pidb.meta
52+
*.pdb.meta
53+
*.mdb.meta
54+
55+
# Unity3D generated file on crash reports
56+
sysinfo.txt
57+
58+
# Builds
59+
*.apk
60+
*.aab
61+
*.unitypackage
62+
*.unitypackage.meta
63+
*.app
64+
65+
# Crashlytics generated file
66+
crashlytics-build.properties
67+
68+
# Packed Addressables
69+
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
70+
71+
# Temporary auto-generated Android Assets
72+
/[Aa]ssets/[Ss]treamingAssets/aa.meta
73+
/[Aa]ssets/[Ss]treamingAssets/aa/*

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.

Editor/BP.PoolIO.Editor.asmdef

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "BP.PoolIO.Editor",
3+
"rootNamespace": "BP.PoolIO.Editor",
4+
"references": [
5+
"GUID:5df53463e12a5c24183fa4fbd6737925"
6+
],
7+
"includePlatforms": [
8+
"Editor"
9+
],
10+
"excludePlatforms": [],
11+
"allowUnsafeCode": false,
12+
"overrideReferences": false,
13+
"precompiledReferences": [],
14+
"autoReferenced": true,
15+
"defineConstraints": [],
16+
"versionDefines": [],
17+
"noEngineReferences": false
18+
}

Editor/BP.PoolIO.Editor.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/EditorUtil.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using BP.PoolIO;
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
public static class EditorUtil
6+
{
7+
8+
[MenuItem("GameObject/Pools/Pool", false, 10)]
9+
public static void CreatePool(MenuCommand menuCommand)
10+
{
11+
GameObject go = new("Pool");
12+
go.AddComponent<Pool>();
13+
EditorCreeate(menuCommand, go);
14+
}
15+
16+
[MenuItem("GameObject/Pools/Group", false, 10)]
17+
public static void CreateGroup(MenuCommand menuCommand)
18+
{
19+
GameObject root = new("Group", typeof(PoolGroup));
20+
var rootGroup = root.GetComponent<PoolGroup>();
21+
for (int i = 0; i < 3; i++)
22+
{
23+
GameObject child = new($"Pool #{i + 1}", typeof(Pool));
24+
child.transform.SetParent(root.transform);
25+
rootGroup.AddPool(child.GetComponent<Pool>());
26+
}
27+
EditorCreeate(menuCommand, root);
28+
}
29+
30+
private static void EditorCreeate(MenuCommand menuCommand, params GameObject[] gameobjects)
31+
{
32+
foreach (var go in gameobjects)
33+
{
34+
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject);
35+
Undo.RegisterCreatedObjectUndo(go, "Create " + go.name);
36+
}
37+
Selection.objects = gameobjects;
38+
}
39+
}

Editor/EditorUtil.cs.meta

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

Examples.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.

0 commit comments

Comments
 (0)