26 lines
491 B
C#
26 lines
491 B
C#
using System;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
|
|
//Only one should exist at the same time
|
|
public class BaseModelBehaviour : ModelBehaviour
|
|
{
|
|
public BaseModel BaseModel
|
|
{
|
|
get
|
|
{
|
|
if (Model is BaseModel bModel)
|
|
{
|
|
return bModel;
|
|
}
|
|
throw new InvalidCastException("model needs to be of type BaseModel");
|
|
}
|
|
set
|
|
{
|
|
Model = value;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
} |