Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
static class ObjectExtension
|
||||
{
|
||||
public static bool IsSceneObject(this Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
bool isSceneType = obj is GameObject || obj is Component;
|
||||
if (!isSceneType)
|
||||
return false;
|
||||
|
||||
return !PrefabUtility.IsPartOfPrefabAsset(obj);
|
||||
}
|
||||
|
||||
public static bool IsPrefab(this Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
return PrefabUtility.IsPartOfPrefabAsset(obj);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue