Minor improvements
This commit is contained in:
@@ -88,13 +88,13 @@ public:
|
|||||||
/// <param name="other">The other.</param>
|
/// <param name="other">The other.</param>
|
||||||
SoftAssetReference(const SoftAssetReference& other)
|
SoftAssetReference(const SoftAssetReference& other)
|
||||||
{
|
{
|
||||||
OnSet(other.Get());
|
OnSet(other.GetID());
|
||||||
}
|
}
|
||||||
|
|
||||||
SoftAssetReference(SoftAssetReference&& other)
|
SoftAssetReference(SoftAssetReference&& other)
|
||||||
{
|
{
|
||||||
OnSet(other.Get());
|
OnSet(other.GetID());
|
||||||
other.OnSet(nullptr);
|
other.OnSet(Guid::Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -317,6 +317,18 @@ public:
|
|||||||
return result;
|
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:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets value indicating if actor is active in the scene.
|
/// Gets value indicating if actor is active in the scene.
|
||||||
|
|||||||
Reference in New Issue
Block a user