Merge remote-tracking branch 'origin/master' into 1.10

# Conflicts:
#	Source/Engine/Level/Prefabs/Prefab.Apply.cpp
This commit is contained in:
Wojtek Figat
2025-02-27 17:17:02 +01:00
40 changed files with 405 additions and 170 deletions

View File

@@ -38,6 +38,16 @@ namespace FlaxEngine
_typeName = typeName;
}
/// <summary>
/// Implicit cast operator from type name to string.
/// </summary>
/// <param name="s">The soft type reference.</param>
/// <returns>The type name.</returns>
public static implicit operator string(SoftTypeReference s)
{
return s._typeName;
}
/// <summary>
/// Gets the soft type reference from full name.
/// </summary>

View File

@@ -12,7 +12,7 @@
/// The soft reference to the scripting type contained in the scripting assembly.
/// </summary>
template<typename T = ScriptingObject>
API_STRUCT(InBuild) struct SoftTypeReference
API_STRUCT(InBuild, MarshalAs=StringAnsi) struct SoftTypeReference
{
protected:
StringAnsi _typeName;
@@ -64,7 +64,7 @@ public:
return *this;
}
FORCE_INLINE SoftTypeReference& operator=(const StringAnsiView& s)
FORCE_INLINE SoftTypeReference& operator=(const StringAnsiView& s) noexcept
{
_typeName = s;
return *this;
@@ -95,6 +95,16 @@ public:
return _typeName.HasChars();
}
operator StringAnsi() const
{
return _typeName;
}
String ToString() const
{
return _typeName.ToString();
}
public:
// Gets the type full name (eg. FlaxEngine.Actor).
StringAnsiView GetTypeName() const