189 Commits

Author SHA1 Message Date
Yoan StAmant
1663073197 [SmartObject] empty definition is considered a valid asset so a newly created definition will not report error on save.
- Fixed internal flag not properly set to false when using error reporting flow.
- Fixed combined validation results that was always using EDataValidationResult::Valid even when errors were reported.
#jira UE-192738
#rb mieszko.zielinski
#lockdown julien.marchand

[CL 27147173 by Yoan StAmant in 5.3 branch]
2023-08-16 14:00:20 -04:00
Yoan StAmant
7c003b66f5 Fix CIS Issue 332657: NonUnity build for non editor targets
#rnx
#jira none

[CL 26440052 by Yoan StAmant in 5.3 branch]
2023-07-18 13:41:57 -04:00
Yoan StAmant
c2c87d4717 Fix bad merge
#rnx

[CL 26433034 by Yoan StAmant in 5.3 branch]
2023-07-18 09:56:25 -04:00
yoan stamant
03daf73b7b [SmartObject] Removed dependency on MassEntity to store slots
#rb mikko.mononen

[CL 26431965 by yoan stamant in 5.3 branch]
2023-07-18 09:00:26 -04:00
Yoan StAmant
49877bfe35 [SmartObject] replaced icon for collection and actor. Also used for SmartObjectComponent and SmartObjectDefinition
#jira UE-189914
#rb mieszko.zielinski

[CL 26405451 by Yoan StAmant in 5.3 branch]
2023-07-17 09:11:33 -04:00
mikko mononen
0b7b19efa0 Gameplay Interaction: Fixed GetSlotEntranceTags
- GetSlotEntranceTags was failing because USmartObjectSubsystem::FindEntranceLocationInternal() required valid capsule even if no physics checks were done
- FindSlotEntranceLocation was missing SearchLocation and would always search around 0,0,0

[CL 25889486 by mikko mononen in ue5-main branch]
2023-06-09 06:52:59 -04:00
yoan stamant
753667ce6d [SmartObject] some cleanup in the blueprint API for SmartObjects
- replaced 'SmartObjectSubsystem.Claim' by 'MarkSlotAsClaimed' for native code and 'USmartObjectBlueprintFunctionLibrary::MarkSmartObjectSlotAsClaimed' for Blueprints
- replaced 'SmartObjectSubsystem.Use' by 'MarkSlotAsOccupied' for native code and 'USmartObjectBlueprintFunctionLibrary::MarkSmartObjectSlotAsOccupied' for Blueprints
- replaced 'SmartObjectSubsystem.Release' by 'MarkSlotAsFree' for native code and 'USmartObjectBlueprintFunctionLibrary::MarkSmartObjectSlotAsFree' for Blueprints
- deprecated 'UGameplayBehaviorSmartObjectsBlueprintFunctionLibrary::UseGameplayBehaviorSmartObject' in favor of the aync task based versions
- UFUNCTION versions are redirected directly to the new names. Native versions are deprecated.
- updated 'AITask_UseGameplayInteraction' and 'AITask_UseGameplayBehaviorSmartObject' to be as close as possible since they are two similar use cases but for different plugins.
   - both tasks now propose blueprint callables to create an "interact on spot" or "move to and interact" tasks:
      - 'UseSmartObjectWithGameplayBehavior' and 'MoveToAndUseSmartObjectWithGameplayBehavior'
      - 'UseSmartObjectWithGameplayInteraction' and 'MoveToAndUseSmartObjectWithGameplayInteraction'
   - 'AITask_UseGameplayBehaviorSmartObject::UseClaimedGameplayBehaviorSmartObject' is redirected to 'MoveToAndUseSmartObjectWithGameplayBehavior' to preserve current behavior
   - 'AITask_UseGameplayInteraction::UseClaimedGameplayInteractionSmartObject' is redirected to 'UseSmartObjectWithGameplayInteraction' to preserve current behavior
#jira UE-187209
#rnx

[CL 25871194 by yoan stamant in ue5-main branch]
2023-06-08 10:34:40 -04:00
mikko mononen
031e60f233 SmartObject: Removed unused cluster union hack and unused property
- removed hacks for handling collisions against geom collection
- Removed unimplemented FSmartObjectSlotValidationParams::bTestUserOverlapOnEntrance

[CL 25866639 by mikko mononen in ue5-main branch]
2023-06-08 05:38:09 -04:00
mikko mononen
1cd2e0af30 GameplayInteractions: added entrance handle to interaction context
- Added entrance handle to the data that is passed to the interaction context, exposed to state tree
- Changed entrance tags to a tag container
- Added State Tree task to get entrance tags from an entrance handle

[CL 25813984 by mikko mononen in ue5-main branch]
2023-06-06 09:07:47 -04:00
yoan stamant
8392b4ee6b [SmartObjects]
- 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]
2023-05-26 12:48:38 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
jodon karlik
472b38353a Properly deprecate old IsDataValid for a new, const version with FDataValidationContext.
This allows your assets to warn on top of erroring out.

#jira UE-183475
#preflight 644ae7701c2846595cbe0e21

[CL 25224515 by jodon karlik in ue5-main branch]
2023-04-27 17:53:18 -04:00
mikko mononen
5ec0776e1f Smart Object: Expose FSmartObjectSlotEntranceLocationResult and FSmartObjectSlotEntranceHandle to Blueprints.
#preflight 6447b4a89770663ce2a504f4

[CL 25178642 by mikko mononen in ue5-main branch]
2023-04-25 08:35:21 -04:00
ben zeigler
9e0ea41c7f Improve blueprint integration with smart objects subsystem:
Deprecate the pure version of FindSmartObjects and add a new non-pure BP wrapper that allows proper iteration of the returned array, both versions are identical when called from C++.
Change TSubclassOf parameters to use values instead of const references, this enables the class picker on those pins.
#jira UE-180500
#preflight skip
#rb yoan.stamant

[CL 25153289 by ben zeigler in ue5-main branch]
2023-04-21 16:47:40 -04:00
yoan stamant
f7b87690eb [SmartObject] replaced check based on a wrong assumption by if statement
#rnx
#rb none
#preflight skip

[CL 25139731 by yoan stamant in ue5-main branch]
2023-04-20 19:08:41 -04:00
yoan stamant
d879711e1b [SmartObjects] public methods relying on EvaluateConditionsForFiltering now validates that the slot handle is set and not stale. In such case a log message will be emitted that suggests to the user to call 'IsSmartObjectSlotValid' to handle that scenario on the call site and avoid the log.
#rb mieszko.zielinski
#preflight 64414bfdf61b80bcf7ea9e06

[CL 25129902 by yoan stamant in ue5-main branch]
2023-04-20 12:37:29 -04:00
yoan stamant
ca4d7ba5fd [SmartObject] moved registration to BeginPlay/EndPlay for components used in a Game world. This will allow conditions to rely on a fully initialized actor in case they need to access other components. It will also make it easier to spawn a SmartObject actor and setup its definition before finishing the spawning.
#jira-none
#rb mieszko.zielinski
#preflight 644001d0bf10538466b1aa0d

[CL 25116704 by yoan stamant in ue5-main branch]
2023-04-19 17:32:09 -04:00
mikko mononen
35825c5a98 SmartObjects: Use only blocking traces/overlap test for entrance validation.
(Adv) Get Mikko's Engine Fix for SO Physics Check Enabled

[CL 25089961 by mikko mononen in ue5-main branch]
2023-04-18 13:26:22 -04:00
yoan stamant
c6f801834a [SmartObject] fixes to SmartObjectCollection build from the world partition builder
- unregisters collections before resetting them to update subsystem internal container and the runtime data. Collection are then registered back as empty collection ready to be populated.
- minor comments improvements
- force debug draw update when registering new objects
- fixed some reported warning regarding failed component unregistration
#rb mieszko.zielinski
#preflight 643e8699bf10538466518715

[CL 25085246 by yoan stamant in ue5-main branch]
2023-04-18 09:40:15 -04:00
mikko mononen
ac46502f9f Smart Objects: Temp hack to handle cluster unions.
#preflight 643945bfec219759f50fdfba

[CL 25039418 by mikko mononen in ue5-main branch]
2023-04-14 09:28:04 -04:00
yoan stamant
8dcb7648b8 [SmartObject] fixed container removal when multiple sequential entries could be removed in batch and properly recompute bounds.
#rb maxime.mercier
#preflight 642f1fa5427eda56265c935d

[CL 24961468 by yoan stamant in ue5-main branch]
2023-04-06 21:11:34 -04:00
yoan stamant
b3795626ae [SmartObject] updated smartobject handle to 64 bits to split handles that could be part of a collection or not (dynamic). This is a fix for dynamic ones to use a different id generation to prevent collisions.
#rnx
#rb mikko.mononen
#rb stephen.holmes
#preflight 642ee06928551807173e7fe6

[CL 24956833 by yoan stamant in ue5-main branch]
2023-04-06 17:03:24 -04:00
mikko mononen
d1a0cd77b7 SmartObjects: Cleaned up unused API.
#jira UE-174418
#preflight 64229dee710ec8400f9f88d1

[CL 24815902 by mikko mononen in ue5-main branch]
2023-03-28 05:20:16 -04:00
mikko mononen
b6ce38e6bf SmartObjects: Fix unity compile errors.
#rb trivial
#preflight 6421822ac44ce895fc483ec0

[CL 24801625 by mikko mononen in ue5-main branch]
2023-03-27 09:00:28 -04:00
mikko mononen
9841195afe SmartObject: Improved validation settings
- Added SmartObjectUserComponent which allows to define validation settings per user actor
- Added option to SO defintion to have preview validation settings or preview user actor (settings pulled from SO user component)
- Move parameters passed to SO annotation CollectDataForGameplayDebugger() into a struct
- Changed USmartObjectSlotValidationFilter to have 2 sets of validation parameters to allow exits to have looser validation
- Changed the API for setting params from Actor in FSmartObjectSlotEntranceLocationRequest (still meh)

#jira UE-174418
#preflight 642173f8a86ae7cbcc25ab0b

[CL 24801238 by mikko mononen in ue5-main branch]
2023-03-27 08:22:19 -04:00