Skip to content

Commit af0d015

Browse files
authored
Merge pull request #81 from AIO-GAME/1.x
1.x
2 parents 5968fde + baba4fd commit af0d015

Some content is hidden

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

60 files changed

+884
-732
lines changed

.github/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
```
2-
█████╗ ██╗ ██████╗ ██╗ ██╗███╗ ██╗██╗████████╗██╗ ██╗ ██████╗██╗ ██╗ █████╗ ███████╗███████╗███████╗████████╗
3-
██╔══██╗██║██╔═══██╗ ██║ ██║████╗ ██║██║╚══██╔══╝╚██╗ ██╔╝ ██╔════╝██║ ██║ ██╔══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝
4-
███████║██║██║ ██║ ██║ ██║██╔██╗ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║ ███████║███████╗███████╗█████╗ ██║
5-
██╔══██║██║██║ ██║ ██║ ██║██║╚██╗██║██║ ██║ ╚██╔╝ ██║ ██║ ██║ ██╔══██║╚════██║╚════██║██╔══╝ ██║
6-
██║ ██║██║╚██████╔╝ ╚██████╔╝██║ ╚████║██║ ██║ ██║ ╚██████╗███████╗██║ ██║ ██║███████║███████║███████╗ ██║
7-
╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝
2+
██╗ ██╗███╗ ██╗██╗████████╗██╗ ██╗ ██████╗██╗ ██╗ █████╗ ███████╗███████╗███████╗████████╗
3+
██║ ██║████╗ ██║██║╚══██╔══╝╚██╗ ██╔╝ ██╔════╝██║ ██║ ██╔══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝
4+
██║ ██║██╔██╗ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║ ███████║███████╗███████╗█████╗ ██║
5+
██║ ██║██║╚██╗██║██║ ██║ ╚██╔╝ ██║ ██║ ██║ ██╔══██║╚════██║╚════██║██╔══╝ ██║
6+
╚██████╔╝██║ ╚████║██║ ██║ ██║ ╚██████╗███████╗██║ ██║ ██║███████║███████║███████╗ ██║
7+
╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝
88
```
99
<p align="center"> <a href="README_EN.md"> English </a> | 简体中文 </p>
1010
<p align="center">

.github/qodana.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#-------------------------------------------------------------------------------#
2+
# Qodana analysis is configured by qodana.yaml file #
3+
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
4+
#-------------------------------------------------------------------------------#
5+
version: "1.0"
6+
linter: jetbrains/qodana-dotnet:2023.3
7+
include:
8+
- name: CheckDependencyLicenses
9+
10+
#Specify IDE code to run analysis without container (Applied in CI/CD pipeline)
11+
ide: QDNET
12+
13+
#Specify inspection profile for code analysis
14+
profile:
15+
name: qodana.starter
16+
17+
#Enable inspections
18+
#include:
19+
# - name: <SomeEnabledInspectionId>
20+
21+
#Disable inspections
22+
exclude:
23+
- name: All
24+
paths:
25+
- "Resources/Editor"
26+
- "*.meta"
27+
- "*.asmdef"
28+
- "*.tt"
29+
30+
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
31+
#bootstrap: sh ./prepare-qodana.sh
32+
33+
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
34+
#plugins:
35+
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

.github/workflows/code_quality.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 🧬 Code Optimize Qodana
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
tags: # 当生成指定标签时触发
9+
- '*.*.*'
10+
branches: # Specify your branches here
11+
- main
12+
- '1.*'
13+
jobs:
14+
qodana:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
checks: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
ref: ${{ github.event.pull_request.head.sha }} # 检查实际的pull请求提交,而不是合并提交
24+
fetch-depth: 0 # 拉请求分析需要完整的历史记录
25+
- name: 🧬 Qodana Scan
26+
uses: JetBrains/[email protected]
27+
with:
28+
pr-mode: false
29+
env:
30+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

.github/workflows/github-close-stale-issues.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# Abandoned Issues and Pull Request".
1313
# https://igorwiese.com/images/papers/Paper_BotSE_19.pdf
1414

15-
name: GitHub - Close stale issues
15+
name: 🧪 GitHub - Close stale issues
1616
on:
17-
schedule: [cron: "50 0 * * 1"] # run weekly Monday 00:50 UTC
17+
schedule: [ cron: "50 0 * * 1" ] # run weekly Monday 00:50 UTC
1818
workflow_dispatch:
1919
jobs:
2020
job-close-stale-issues:
@@ -32,8 +32,28 @@ jobs:
3232
exempt-issue-labels: 'blocker,bug,enhancement,help wanted,regression'
3333
days-before-stale: 90
3434
days-before-close: 30
35-
stale-issue-message: 'This issue is stale because it has been open for 90 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.'
36-
stale-pr-message: 'This PR is stale because it has been open for 90 days with no activity. Please remove the stale label or add a comment or this PR will be closed in 30 days.'
37-
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity. Please feel free to reopen.'
38-
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity. Please feel free to reopen.'
35+
stale-issue-message: |
36+
### English
37+
This issue is stale because it has been open for 90 days with no activity.
38+
Please remove the stale label or add a comment or this issue will be closed in 30 days.
39+
### 中文
40+
此问题已经打开了90天没有活动,因此已经过时。
41+
请删除过时标签或添加评论,否则此问题将在30天内关闭。
42+
stale-pr-message: |
43+
### English
44+
This PR is stale because it has been open for 90 days with no activity.
45+
Please remove the stale label or add a comment or this PR will be closed in 30 days.
46+
### 中文
47+
此拉取请求已经打开了90天没有活动,因此已经过时。
48+
请删除过时标签或添加评论,否则此拉取请求将在30天内关闭。
49+
close-issue-message: |
50+
### English
51+
This issue was closed because it has been stale for 30 days with no activity. Please feel free to reopen.
52+
### 中文
53+
此问题已经过时30天没有活动,因此已经关闭。请随时重新打开。
54+
close-pr-message: |
55+
### English
56+
This PR was closed because it has been stale for 30 days with no activity. Please feel free to reopen.
57+
### 中文
58+
此拉取请求已经过时30天没有活动,因此已经关闭。请随时重新打开.
3959
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/greetings.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🧪 CI Greetings
22

3-
on: [pull_request_target, issues]
3+
on: [ pull_request_target, issues ]
44

55
jobs:
66
greeting:
@@ -9,16 +9,27 @@ jobs:
99
issues: write
1010
pull-requests: write
1111
steps:
12-
- uses: actions/first-interaction@v1
13-
with:
14-
repo-token: ${{ secrets.GITHUB_TOKEN }}
15-
issue-message: "Hello @${{ github.actor }} , thank you for submitting an issue!"
16-
pr-message: "Hello @${{ github.actor }} , thank you submitting a pull request!"
17-
issuesOpened: |
18-
👋 @{{ author }} Thank you for raising an issue.
19-
We will will investigate into the matter and get back to you as soon as possible.
20-
Please make sure you have given us as much context as possible.
21-
pullRequestOpened: |
22-
👋 @{{ author }}
23-
Thank you for raising your pull request.
24-
Please make sure you have followed our contributing guidelines. We will review it as soon as possible
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
issue-message: "Hello @${{ github.actor }} , thank you for submitting an issue!"
16+
pr-message: "Hello @${{ github.actor }} , thank you submitting a pull request!"
17+
issuesOpened: |
18+
### English
19+
👋 @{{ author }} Thank you for raising an issue.
20+
We will will investigate into the matter and get back to you as soon as possible.
21+
Please make sure you have given us as much context as possible.
22+
### 中文
23+
👋 @{{ author }} 感谢您提出问题。
24+
我们将调查此问题并尽快回复您。
25+
请确保您尽可能提供尽可能多的上下文。
26+
27+
pullRequestOpened: |
28+
### English
29+
👋 @{{ author }}
30+
Thank you for raising your pull request.
31+
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
32+
### 中文
33+
👋 @{{ author }}
34+
感谢您提出拉取请求。
35+
请确保您已遵循我们的贡献准则。我们将尽快审查它。

.github/workflows/label.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# This workflow will triage pull requests and apply a label based on the
22
# paths that are modified in the pull request.
33
#
4-
# To use this workflow, you will need to set up a .github/labeler.yml
4+
# To use this workflow, you will need to set up a .github/workflows/labeler.yml
55
# file with configuration. For more information, see:
66
# https://github.com/actions/labeler
77

8-
name: 🧬 CI Labeler
9-
on: [pull_request_target]
8+
name: 🧪 CI Labeler
9+
on: [ pull_request_target ]
1010

1111
jobs:
1212
label:
13-
1413
runs-on: ubuntu-latest
1514
permissions:
1615
contents: read
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1+
name: 🧪 CI Generate a list of contributors
12
on:
23
push:
34
branches:
45
- main
5-
6-
name: 🧪 CI Generate a list of contributors
7-
86
jobs:
97
contrib-readme-en-job:
108
runs-on: ubuntu-latest
@@ -15,9 +13,9 @@ jobs:
1513
with:
1614
image_size: 64
1715
readme_path: .github/README.md
18-
use_username: true
16+
use_username: true
1917
commit_message: "🤖 [contrib-readme-action] : updated readme"
2018
committer_username: "Action Contrib Readme"
2119
committer_email: "[email protected]"
2220
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '30 08 * * *'
11+
12+
jobs:
13+
stale:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
steps:
21+
- uses: actions/stale@v9
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
stale-issue-message: 'Stale issue message'
25+
stale-pr-message: 'Stale pull request message'
26+
stale-issue-label: 'no-issue-activity'
27+
stale-pr-label: 'no-pr-activity'

.gitignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
*.git
66
*.vscode
77

8+
# 编译器
9+
.git/
10+
.vs/
11+
.gradle/
12+
.idea/
13+
.vscode/
14+
.consulo/
15+
816
!*.dll.meta
917
!*.asset.meta
1018
!*.asmdef.meta
1119
!*.cs.meta
1220

13-
.git/
14-
.vs/
15-
.idea/
16-
.gradle/
17-
.consulo/
1821
[Bb]uild/
1922
[Bb]uilds/
2023
[Tt]emp/
2124
[Oo]bj/
2225
[Ll]ogs/
2326
[Bb]in/
24-
[Oo]bj/
2527
[Pp]ackages/
2628
[Vv]env/

Editor/Data/AssetBuildConfig.cs

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.ComponentModel;
33
using System.IO;
4+
using System.Linq;
45
using AIO.UEngine;
56
using UnityEditor;
67
using UnityEngine;
@@ -64,28 +65,25 @@ public partial class AssetBuildConfig : ScriptableObject
6465
/// </summary>
6566
public static AssetBuildConfig GetOrCreate()
6667
{
67-
if (_instance is null)
68-
{
69-
var objects = EHelper.IO.GetScriptableObjects<AssetBuildConfig>();
70-
if (objects != null && objects.Length > 0)
71-
foreach (var asset in objects)
72-
{
73-
if (asset is null) continue;
74-
if (string.IsNullOrEmpty(asset.BuildOutputPath))
75-
asset.BuildOutputPath = Path.Combine(EHelper.Path.Project, "Bundles");
76-
77-
_instance = asset;
78-
break;
79-
}
80-
81-
if (_instance is null)
68+
if (_instance != null) return _instance;
69+
70+
var objects = EHelper.IO.GetScriptableObjects<AssetBuildConfig>();
71+
if (objects != null && objects.Length > 0)
72+
foreach (var asset in objects.Where(asset => asset))
8273
{
83-
_instance = CreateInstance<AssetBuildConfig>();
84-
_instance.BuildOutputPath = Path.Combine(EHelper.Path.Project, "Bundles");
85-
AssetDatabase.CreateAsset(_instance, "Assets/Editor/ASBuildConfig.asset");
86-
AssetDatabase.SaveAssets();
74+
if (string.IsNullOrEmpty(asset.BuildOutputPath))
75+
asset.BuildOutputPath = Path.Combine(EHelper.Path.Project, "Bundles");
76+
77+
_instance = asset;
78+
break;
8779
}
88-
}
80+
81+
if (_instance) return _instance;
82+
83+
_instance = CreateInstance<AssetBuildConfig>();
84+
_instance.BuildOutputPath = Path.Combine(EHelper.Path.Project, "Bundles");
85+
AssetDatabase.CreateAsset(_instance, "Assets/Editor/ASBuildConfig.asset");
86+
AssetDatabase.SaveAssets();
8987

9088
return _instance;
9189
}

Editor/Data/Collect/Root/AssetCollectRoot.Helper.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.IO;
3+
using System.Linq;
34
using UnityEditor;
45
using Object = UnityEngine.Object;
56

@@ -114,11 +115,11 @@ public static AssetCollectRoot GetOrCreate()
114115
var objects = EHelper.IO.GetScriptableObjects<AssetCollectRoot>();
115116
if (objects != null && objects.Length > 0)
116117
{
117-
foreach (var asset in objects)
118+
foreach (var asset in objects.Where(asset => asset))
118119
{
119-
if (asset is null) continue;
120120
if (asset.Packages is null)
121121
asset.Packages = Array.Empty<AssetCollectPackage>();
122+
122123
_Instance = asset;
123124
return _Instance;
124125
}
@@ -138,11 +139,12 @@ public static AssetCollectRoot GetOrCreate()
138139
/// <param name="isLower">是否小写</param>
139140
/// <param name="hasExtension">是否包含后缀</param>
140141
/// <param name="limitPackage">限制包名 只查找指定包资源 空则忽略</param>
141-
/// <returns>
142-
/// Item1 包名
143-
/// Item2 组名
144-
/// Item3 可寻址路径
145-
/// </returns>
142+
/// <returns> <code>
143+
/// var result = AssetCollectRoot.AssetToAddress();
144+
/// result.Item1 包名
145+
/// result.Item2 组名
146+
/// result.Item3 可寻址路径
147+
/// </code> </returns>
146148
public static Tuple<string, string, string> AssetToAddress(string assetPath, bool isLower, bool hasExtension, string limitPackage = "")
147149
{
148150
if (IsNoAssetPath(assetPath)) return Empty;

Editor/Interface/IAssetRuleFilter/IAssetRuleFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface IAssetRuleFilter
1111
/// 显示顺序
1212
/// </summary>
1313
int DisplayIndex { get; }
14-
14+
1515
/// <summary>
1616
/// 验证资源是否符合规则
1717
/// </summary>

0 commit comments

Comments
 (0)