Expose IsDuringPlay property for actors and scripts to use in scripting

This commit is contained in:
Wojciech Figat
2022-07-29 14:52:41 +02:00
parent e16cbdbfd0
commit 4b6e75c0af
2 changed files with 4 additions and 1 deletions

View File

@@ -166,6 +166,9 @@ void ContentService::Dispose()
// Save assets registry before engine closing // Save assets registry before engine closing
Cache.Save(); Cache.Save();
// Flush objects (some asset-related objects/references may be pending to delete)
ObjectsRemovalService::Flush();
// Unload all remaining assets // Unload all remaining assets
{ {
ScopeLock lock(AssetsLocker); ScopeLock lock(AssetsLocker);

View File

@@ -97,7 +97,7 @@ public:
/// <summary> /// <summary>
/// Determines whether object is during play (spawned/loaded and fully initialized). /// Determines whether object is during play (spawned/loaded and fully initialized).
/// </summary> /// </summary>
FORCE_INLINE bool IsDuringPlay() const API_PROPERTY() FORCE_INLINE bool IsDuringPlay() const
{ {
return (Flags & ObjectFlags::IsDuringPlay) != 0; return (Flags & ObjectFlags::IsDuringPlay) != 0;
} }