Minor fixes
This commit is contained in:
@@ -61,7 +61,7 @@ void SceneObject::BreakPrefabLink()
|
|||||||
|
|
||||||
String SceneObject::GetNamePath(Char separatorChar) const
|
String SceneObject::GetNamePath(Char separatorChar) const
|
||||||
{
|
{
|
||||||
Array<String> names;
|
Array<StringView> names;
|
||||||
const Actor* a = dynamic_cast<const Actor*>(this);
|
const Actor* a = dynamic_cast<const Actor*>(this);
|
||||||
if (!a)
|
if (!a)
|
||||||
a = GetParent();
|
a = GetParent();
|
||||||
@@ -75,6 +75,8 @@ String SceneObject::GetNamePath(Char separatorChar) const
|
|||||||
int32 length = names.Count() - 1;
|
int32 length = names.Count() - 1;
|
||||||
for (int32 i = 0; i < names.Count(); i++)
|
for (int32 i = 0; i < names.Count(); i++)
|
||||||
length += names[i].Length();
|
length += names[i].Length();
|
||||||
|
if (length == 0)
|
||||||
|
return String::Empty;
|
||||||
String result;
|
String result;
|
||||||
result.ReserveSpace(length);
|
result.ReserveSpace(length);
|
||||||
Char* ptr = result.Get();
|
Char* ptr = result.Get();
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ void SceneObjectsFactory::HandleObjectDeserializationError(const ISerializable::
|
|||||||
dummyScript->Data = MoveTemp(bufferStr);
|
dummyScript->Data = MoveTemp(bufferStr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
LOG(Warning, "Parent actor of the missing object: {0}", parent->GetName());
|
LOG(Warning, "Parent actor of the missing object: '{0}' ({1})", parent->GetNamePath(), String(parent->GetType().Fullname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user