mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
28 lines
641 B
C#
28 lines
641 B
C#
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);
|
|
}
|
|
}
|
|
}
|