Allow Scripting Object as BT blackboard but don't support plain classes
This commit is contained in:
@@ -16,7 +16,7 @@ namespace FlaxEngine
|
|||||||
#if FLAX_EDITOR
|
#if FLAX_EDITOR
|
||||||
private static bool IsValidBlackboardType(ScriptType type)
|
private static bool IsValidBlackboardType(ScriptType type)
|
||||||
{
|
{
|
||||||
if (ScriptType.FlaxObject.IsAssignableFrom(type))
|
if (new ScriptType(typeof(SceneObject)).IsAssignableFrom(type))
|
||||||
return false;
|
return false;
|
||||||
if (type.Type != null)
|
if (type.Type != null)
|
||||||
{
|
{
|
||||||
@@ -35,7 +35,7 @@ namespace FlaxEngine
|
|||||||
!type.IsAbstract &&
|
!type.IsAbstract &&
|
||||||
!type.IsArray &&
|
!type.IsArray &&
|
||||||
!type.IsVoid &&
|
!type.IsVoid &&
|
||||||
(type.IsClass || type.IsStructure) &&
|
(type.IsStructure || ScriptType.FlaxObject.IsAssignableFrom(type)) &&
|
||||||
type.IsPublic &&
|
type.IsPublic &&
|
||||||
type.CanCreateInstance;
|
type.CanCreateInstance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user