unity PrefabUtility 接口使用记录

bool isAny = PrefabUtility.IsAnyPrefabInstanceRoot(node);

bool isAdded = PrefabUtility.IsAddedGameObjectOverride(node);

GameObject or = PrefabUtility.GetOutermostPrefabInstanceRoot(node);

GameObject nr = PrefabUtility.GetNearestPrefabInstanceRoot(node);

返回值记录:

|-------------------|-------|---------|-------------------|-------------------|
| | isAny | isAdded | or | nr |
| prefab_oriVariant | True | False | prefab_oriVariant | prefab_oriVariant |
| ori_cube | False | False | prefab_oriVariant | prefab_oriVariant |
| var_Cube | False | True | null | null |
| prefab_ori2 | True | True | prefab_ori2 | prefab_ori2 |
| ori2_Capsule | False | False | prefab_ori2 | prefab_ori2 |
| var_Sphere | False | True | null | null |

相关推荐
郝学胜-神的一滴18 小时前
中级OpenGL教程 004:为几何体注入法线灵魂
c++·unity·游戏引擎·godot·图形渲染·opengl·unreal
la_vie_est_belle2 天前
Pygame Studio——用Python自制的一款可视化游戏编辑器
python·游戏·编辑器·游戏引擎·pygame·pyside6·pygame-ce
LF男男3 天前
GameManager.cs
unity
晴夏。3 天前
c++调用lua的方法
c++·游戏引擎·lua·ue
RPGMZ4 天前
RPGMakerMZ 地图存档点制作 标题继续游戏直接读取存档
开发语言·javascript·游戏·游戏引擎·rpgmz·rpgmakermz
郝学胜-神的一滴4 天前
[简化版 GAMES 101] 计算机图形学 07:图形学投影完全推导
c++·unity·图形渲染·three.js·unreal engine
晴夏。4 天前
UE垃圾回收的全方面讲解(通俗易懂)【底层实现、触发方式、引用保持、优化、工具】
ue5·游戏引擎·ue·垃圾回收
相信神话20214 天前
3.2《酒魂》规则设计文档
游戏引擎·godot·2d游戏编程·godot4·2d游戏开发
Avalon7125 天前
Unity3D响应式渲染UI框架UniVue
游戏·ui·unity·c#·游戏引擎
风酥糖5 天前
Godot游戏练习01-第33节-新增会爆炸的敌人
游戏·游戏引擎·godot