Added some additional code as a workaround to the fact that Serialize is not called on CDO.
#rb mikko.mononen
[CL 32188938 by yoan stamant in ue5-main branch]
- allow smart object creation from definition, transform and owner descriptor struct that will use dynamic ids
- moved FSmartObjectHandleFactory to the SmartObjectTypes and added method to get a dynamic id
- replaced registration type `WithCollection` by `BindToExistingInstance` in USmartObjectComponent since it can also be used for objects not tied to a component lifetime created from CreateSmartObject
- allow subsystem component accessor to force hydrate the actor associated to a smart object.
- fixed automation test to use the right property to set a definition asset now that it has been renamed
#rb Mieszko.Zielinski, mikko.mononen
#tests QAGame, unit tests, Juno
[CL 31291768 by yoan stamant in ue5-main branch]
- Added ability to parameterize the SOD using parameters and property copy
- Each Asset stores and shares a variations based parameter hash
#rb Yoan.StAmant
[CL 30965071 by mikko mononen in ue5-main branch]
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
Smart Object: Added parameters for Smart Object Definition
- Added ability to parameterize the SOD using parameters and property copy
- Each Asset stores and shares a variations based parameter hash
#rb Yoan.StAmant
[CL 30842479 by edwin maynard in ue5-main branch]
- Added ability to parameterize the SOD using parameters and property copy
- Each Asset stores and shares a variations based parameter hash
#rb Yoan.StAmant
[CL 30836942 by mikko mononen in ue5-main branch]
- Gameplay tags are used to identify a reason
- Default reason "SmartObject.EnabledReason.Gameplay" is a tag (UE::SmartObject::EnabledReason::Gameplay) provided by the plugin and used by default if no other reason is specified
- Tags are converted to bit masks and stored as disable flags in runtime instance
- External systems can declare new Gameplay Tags for the specific needs. System currently allows 16 different reasons (1 default + 15 custom)
- A Smart Object instance is considered disabled as soon as at least one reason is set
#rb Luciano.Ferraro, mikko.mononen
[CL 29989734 by yoan stamant in ue5-main branch]
Mark the handle and SO definiton as replicated on the base Smart object Component class. For now, this won't do anything. Going forward we will create an "Online Smart object Component" that actually stores the additional replication data as to not add a bunch of unused data on existing uses of the component.
#jira UE-188873
#jira UE-180500
#rb Yoan.StAmant
[CL 27274296 by ben hoffman in ue5-main branch]
- RemoveComponentFromSimulation is now properly unbinding the component
- Unbinding a component from the simulation won't invalidate the registered handle anymore; this is handled by the FSmartObjectContainer.
- Removed obsolete RuntimeCreatedEntries that was replaced by the registration type.
- Added IsBoundToSimulation to the SmartObjectComponent to differentiate a registered component (valid Handle) from a registered component bound to the simulation (linked to its runtime instance)
- DebugUnregisterAllSmartObjects will no longer cause an ensure when calling EndPlay with the previous fixes.
- Added unit tests for IsBoundToSimulation and RemoveComponentFromSimulation+UnregisterSmartObject sequence to simulate the EndPlay issue.
#tests PIE, rebuild collection, WorldPartition levels, used cheats multiple times
#rb mieszko.zielinski
#preflight 64709c8a893dadf035e51c75
[CL 25647084 by yoan stamant in ue5-main branch]
- Added new methods to the API to filter a list of request results or slot handles by evaluating the selection preconditions
- Filter methods can accept external data as a struct with properties which name and type match the WolrdConditionContext.
- FSmartObjectUserContext has been introduced to cover the common case of passing in a user actor to the context.
- Stored UserDescriptor as instanced struct in the runtime slot
- Claim methods now receive a user descriptor
- Removed slot event delegate and reuse the runtime instance one instead. Listeners can filter for a given slot using 'Event.SlotHandle'
- Removed UserTags from the SmartObjectWorldConditionSchema. The user tags are part of the query filter. Conditions requiring user tags could fetch them from the actors passed in the context.
#rb mikko.mononen
#jira UE-157763
#preflight 63dbe99f797b029c0add9806
[CL 23984054 by yoan stamant in ue5-main branch]
* Ran IWYU on ~170 plugins to remove includes not needed. Public api still keep old includes inside #if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
#preflight 63d09351574ab9cae4670216
#rb none
[CL 23844750 by henrik karlsson in ue5-main branch]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121
[CL 23756420 by yoan stamant in ue5-main branch]
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[SmartObjects]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121
[CL 23752170 by bob tellez in ue5-main branch]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121
[CL 23747892 by yoan stamant in ue5-main branch]
* Unregister - keeps or deletes the runtime SO information based on SmartObjectComponent.RegistrationType
* Remove - called on SmartObject's EndPlay and ends up removing runtime data regardless of the registration type.
Also:
* SmartObjectSubsystem unfriended SmartObjectComponent - it was a toxic relationship anyway! ;)
* Made changes towards simplification of how things are done - Registering, Unregistering, Binding SO Component to a RuntimeInstance.
#preflight 6390906fbb6fefa4721822e4
[CL 23431219 by mieszko zielinski in ue5-main branch]
- SmartObject gained knowledge whether it was registered as a part of a colleciton, or as a dynamic smart object.
- cleaned up SmartObjectComponents SOHandle setting an resetting - there's a separate function for invalidating the handle.
- added handling of SmartObjectComponent's destruction (as opposed to unregistration due to being streamed out, potentially temporarily)
#preflight 638a25c74c3ce8ae5d20ba60
[CL 23389318 by mieszko zielinski in ue5-main branch]
In addition:
* SmartObjectCollection got deprecated and there's a auto-update path triggered in SmartObjectCollection::PostLoad
* SmartObjectComponent component can opt out of being a part of a collection with `bCanBePartOfCollection`
* Right now we limit SmartObjects to be registered with at most a single Collection. This might change in the future if required.
Note that this is the first change in a series, we're going to support miltiple collections per level with convenient ways of assigning SmartObjects to individual collections.
#jira UE-168977
#preflight 637f8faa4004f73f627ecaca
#preflight 637fa5378b12eb83a77ad7d9
[CL 23262132 by mieszko zielinski in ue5-main branch]