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 |

相关推荐
丁小未17 小时前
基于MVVM框架的XUUI 扩展的UI管理系统教程
unity·mvvm·ui框架·xuui·ui管理器
丁小未1 天前
基于MVVM框架的XUUI HelloWorld 新手教程
unity·性能优化·c#·游戏引擎
丁小未1 天前
基于MVVM框架的XUUI MoreComplex案例
unity·c#
EQ-雪梨蛋花汤1 天前
【Unity笔记】VR 一体机画面锯齿、模型边缘闪烁、接缝抖动排查:MSAA、Mipmap、Render Scale、Z-Fighting 全流程记录
笔记·unity·vr
松树戈2 天前
【Godot4精进之路】03~Godot编辑器常用界面介绍
编辑器·游戏引擎·godot
YigAin2 天前
Unity Spine 资源出现白边的解决办法
unity·游戏引擎·spine
郝学胜-神的一滴2 天前
中级OpenGL教程 013:渲染器类架构设计与逐帧渲染流程详解
开发语言·c++·unity·游戏引擎·图形渲染·opengl·unreal
_helen_5203 天前
unreal engine 虚拟现实 + airsim
游戏引擎·vr·虚幻
真鬼1234 天前
【Unity WebGL】内嵌网页与双向通信
unity·游戏引擎·webgl
zyh______5 天前
C#语法糖(按照实用性排序)
unity·c#