Minor improvements
This commit is contained in:
@@ -88,13 +88,13 @@ public:
|
||||
/// <param name="other">The other.</param>
|
||||
SoftAssetReference(const SoftAssetReference& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other.GetID());
|
||||
}
|
||||
|
||||
SoftAssetReference(SoftAssetReference&& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
other.OnSet(nullptr);
|
||||
OnSet(other.GetID());
|
||||
other.OnSet(Guid::Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -317,6 +317,18 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new script of a specific type and adds it to the actor.
|
||||
/// </summary>
|
||||
/// <returns>The created script instance, null otherwise.</returns>
|
||||
template<typename T>
|
||||
T* AddScript()
|
||||
{
|
||||
auto script = New<T>();
|
||||
script->SetParent(this);
|
||||
return script;
|
||||
}
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Gets value indicating if actor is active in the scene.
|
||||
|
||||
Reference in New Issue
Block a user