测试Design

This commit is contained in:
zhang hongbo 2026-01-19 20:53:22 +08:00
parent ab74cafb67
commit 8c3fbe867d
6 changed files with 537 additions and 2 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 776967bcb6d81964883638d6ff5c3d8a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1 +1 @@
Subproject commit c2231b3e3546c47524f1d12552da908aaaaff098 Subproject commit a6a4d64a0c38b19d7eb3c2ec50c2428c31f0ecca

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: db4ae42156327824489c64c98aab7a01
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Editor.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e0fe03788bb6e154fada55aed54bfd49
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -287,7 +287,99 @@ PlayerSettings:
AndroidValidateAppBundleSize: 1 AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150 AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons: [] m_BuildTargetIcons: []
m_BuildTargetPlatformIcons: [] m_BuildTargetPlatformIcons:
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 0
m_SubKind:
m_BuildTargetBatching: m_BuildTargetBatching:
- m_BuildTarget: Standalone - m_BuildTarget: Standalone
m_StaticBatching: 1 m_StaticBatching: 1

419
策划Git操作指南.md Normal file
View File

@ -0,0 +1,419 @@
# 策划Git操作指南
> 💡 **提示**命令行操作最准确可靠。SourceTree因版本不同界面可能有差异如遇找不到功能的情况请使用命令行。
---
## 📋 目录
1. [首次拉取项目](#首次拉取项目)
2. [日常提交流程](#日常提交流程)
3. [查看美术资源](#查看美术资源)
4. [避免冲突](#避免冲突)
5. [解决冲突](#解决冲突)
6. [自动同步SubModule](#自动同步submodule)
---
## 首次拉取项目
### 命令行方式 ✅
```powershell
# 1. 克隆项目自动包含SubModule
git clone --recursive git@gitea.bywaystudios.com:zhanghongbo/MeowmentDesign.git
# 2. 进入项目
cd MeowmentDesign
# 3. 配置自动同步SubModule
git config submodule.recurse true
# 4. 配置用户信息
git config user.name "GuoSiteng"
git config user.email "lisi@company.com"
# 完成可以用Unity打开项目了
```
### SourceTree方式
```
1. File → Clone / New
2. 填写信息:
Source URL: git@gitea.bywaystudios.com:你的用户名/MeowmentDesign.git
Destination Path: E:\WorkSpace\MeowmentDesign
✓ Recurse submodules ← 勾选这个!
3. 点击 Clone
4. 克隆完成后Tools → Options → Git
找到 Submodules 部分
✓ 勾选 Update submodules when pulling
```
---
## 日常提交流程
### 命令行方式 ✅
```powershell
# === 第一步在Design SubModule内提交 ===
cd Assets/Design_SubModule
# 查看修改了哪些文件
git status
# 添加文件(可以选择性添加)
git add Configs/level1.json # 添加单个文件
git add Configs/ # 添加整个文件夹
git add . # 添加所有修改
# 提交前先拉取更新(避免冲突)
git pull
# 提交
git commit -m "配置第一关卡数据"
# 推送到远程
git push
# === 第二步回到主项目提交记录SubModule更新 ===
cd ../..
# 查看状态会看到SubModule有变化
git status
# 添加SubModule的变化
git add Assets/Design_SubModule
# 提交主项目
git commit -m "更新关卡配置"
# 推送
git push
```
### SourceTree方式
```
=== 第一步提交Design SubModule ===
1. 在左侧 SUBMODULES 区域双击 "Assets/Design_SubModule"
会打开新窗口显示SubModule
2. 在SubModule窗口
- 点击 File Status
- 勾选要提交的文件(不要全选!)
- 点击 Stage Selected暂存所选
- 底部输入提交信息:"配置第一关卡数据"
- 点击 Commit
- 点击 Push
=== 第二步:提交主项目 ===
3. 回到主项目窗口:
- File Status 会显示 "Assets/Design_SubModule" 有变化
- 勾选这个变化
- 点击 Stage Selected
- 输入提交信息:"更新关卡配置"
- 点击 Commit
- 点击 Push
```
**⚠️ 重要提示:**
- 必须先push Design_SubModule再push主项目
- 两个都要提交,缺一不可
- 不要修改 Art_SubModule 里的内容(只读)
---
## 查看美术资源
### Art_SubModule是只读的
```
项目结构:
Assets/
├── Art_SubModule/ ← 只读!可以查看,不能修改
└── Design_SubModule/ ← 可读写!你的工作区
```
### 更新美术资源
美术更新了资源后,你需要手动拉取:
#### 命令行方式 ✅
```powershell
cd MeowmentDesign
# 更新美术SubModule到最新
git submodule update --remote Assets/Art_SubModule
# 如果需要,提交这个更新
git add Assets/Art_SubModule
git commit -m "同步最新美术资源"
git push
```
#### SourceTree方式
```
1. 右键 SUBMODULES → Assets/Art_SubModule
2. 选择 Update
3. 更新后在主项目提交这个变化
```
### 使用美术资源
```
✅ 可以做:
- 在Unity中查看美术资源
- 引用美术资源(做配置时预览)
- 在配置文件中填写美术资源路径
❌ 不能做:
- 修改美术资源文件
- 删除美术资源
- 在Art_SubModule里提交
如果发现美术资源有问题,请通知美术修改!
```
---
## 避免冲突
### 规则1提交前先拉取 ⭐ 最重要
```powershell
# 养成习惯:每次提交前先执行
cd Assets/Design_SubModule
git pull # 先拉取别人的更新
# 如果有冲突,现在解决比稍后解决简单
# 然后再提交你的修改
git add .
git commit -m "..."
git push
```
### 规则2明确分工
```
建议分工方式:
策划A → Levels/ 关卡配置
策划B → Characters/ 角色配置
策划C → Items/ 道具配置
各自只修改自己负责的文件夹,不会冲突!
```
### 规则3使用不同的文件
```
✅ 好方法:
level1.json ← 策划A负责
level2.json ← 策划B负责
level3.json ← 策划C负责
❌ 容易冲突:
多个人修改同一个 config.json
```
### 规则4提交前沟通
```
在团队群里:
"我正在修改 level1.json大家别动这个文件"
"收到!"
→ 避免多人同时修改同一文件
```
---
## 解决冲突
### 场景1push时提示冲突
#### 命令行方式 ✅
```powershell
cd Assets/Design_SubModule
# 推送失败
git push
# ❌ error: failed to push some refs
# 原因:远程有新提交
# 解决方法:
# 1. 先拉取远程更新
git pull
# 2. 如果自动合并成功
# Merge made by... ← 看到这个说明成功
git push # 再次推送即可
# 3. 如果提示冲突
# CONFLICT (content): Merge conflict in Configs/level1.json
# 4. 查看哪些文件冲突
git status
# both modified: Configs/level1.json ← 冲突的文件
# 5. 打开冲突文件,会看到冲突标记:
# <<<<<<< HEAD
# {
# "level": 1,
# "难度": "简单" ← 你的修改
# }
# =======
# {
# "level": 1,
# "difficulty": "easy" ← 别人的修改
# }
# >>>>>>> commit-hash
# 6. 手动编辑文件,决定保留什么:
# {
# "level": 1,
# "difficulty": "easy",
# "难度": "简单" ← 合并后保留两个
# }
# 删除所有冲突标记(<<<<<<<, =======, >>>>>>>
# 7. 标记冲突已解决
git add Configs/level1.json
# 8. 完成合并
git commit -m "解决配置文件冲突"
# 9. 推送
git push
```
#### SourceTree方式
```
1. Push失败后会提示需要Pull
2. 点击 Pull 按钮
3. 如果有冲突,会显示:
⚠️ Conflicted files:
- Configs/level1.json
4. 右键冲突文件:
对于JSON/文本文件:
- 可以选择 Resolve Conflicts → Launch External Merge Tool
- 或直接用编辑器打开文件手动合并
手动编辑:
- 打开文件
- 删除冲突标记 <<<<<<<, =======, >>>>>>>
- 保留需要的内容
- 保存文件
5. 解决后:
- 右键文件 → Mark Resolved
- 或者在 File Status 中右键 → Resolve Conflicts → Mark Resolved
- 点击 Commit
- 输入 "解决配置文件冲突"
- Push
```
### 场景2主项目SubModule引用冲突
#### 命令行方式 ✅
```powershell
cd MeowmentDesign # 主项目根目录
git pull
# CONFLICT (submodule): Merge conflict in Assets/Design_SubModule
# 解决方法:
# 1. 进入SubModule拉取最新
cd Assets/Design_SubModule
git pull
cd ../..
# 2. 标记已解决
git add Assets/Design_SubModule
# 3. 完成合并
git commit -m "同步SubModule更新"
# 4. 推送
git push
```
---
## 自动同步SubModule
### 问题pull时SubModule没更新
**原因**:默认情况下 `git pull` 不会自动更新SubModule
**解决方法**
#### 命令行方式 ✅
```powershell
cd MeowmentDesign # 主项目根目录
# 一次性配置,永久生效
git config submodule.recurse true
# 配置后git pull 会自动同步SubModule
git pull # 会自动更新SubModule了
# 验证配置
git config --get submodule.recurse
# 输出: true = 配置成功
```
#### SourceTree方式
```
方式1全局设置
1. Tools → Options → Git
2. 找到 Submodules 部分
3. ✓ 勾选 Update submodules when pulling
方式2Pull时手动勾选
1. 每次点击 Pull 时
2. 在弹出对话框中
3. ✓ 勾选 Update submodules
4. 点击 OK
```
### 手动更新SubModule到最新版本
```powershell
# 更新Design_SubModule到最新
git submodule update --remote Assets/Design_SubModule
# 更新美术资源到最新
git submodule update --remote Assets/Art_SubModule
# 更新所有SubModule
git submodule update --remote --recursive
# 或在SourceTree中
# Repository → Update Submodules...
```
---
**遇到问题随时联系客户端程序!**