Commit Graph

199 Commits

Author SHA1 Message Date
ben hoffman
62ceb709ea Fix the display name on K2_GetSlots to be pretty
#rb trivial
#rnx

[CL 27283535 by ben hoffman in ue5-main branch]
2023-08-22 16:00:16 -04:00
ben hoffman
d3561d50e6 Disable Replication of properties on the base Smart Object component class to get rid of warnings on boot
#rb trivial
#rnx

[CL 27282777 by ben hoffman in ue5-main branch]
2023-08-22 15:35:40 -04:00
ben hoffman
c3fe7f0458 Expose some smart object component, definition, and runtime options to blueprints to make it possible to have some very basic interactions with them inside a blueprint.
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]
2023-08-22 12:17:21 -04:00
mikko mononen
43048ec34c [SmartObjects] Added events to listen to Smart Object Component bind/unbind
- Exposed USmartObjectComponent.IsBoundToSimulation() to BP

[CL 27197315 by mikko mononen in ue5-main branch]
2023-08-18 03:54:54 -04:00
yoan stamant
71625258d0 [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 27147839 by yoan stamant in ue5-main branch]
2023-08-16 14:15:36 -04:00
mikko mononen
ee1a8c115a [SmartObjects] Default trace ground location to true for slots, as that is what users seem to expect.
[CL 27135901 by mikko mononen in ue5-main branch]
2023-08-16 07:26:50 -04:00
mikko mononen
b5f6447b2d [SmartObjects] Made USmartObjectSubsystem::QueryAllValidatedEntranceLocations() static so that it can be used even if SO subsystem is not available.
[CL 27064404 by mikko mononen in ue5-main branch]
2023-08-14 03:40:42 -04:00
mikko mononen
33bb4fe2c0 [SmartObjects] Added ability to validate a smart object definition and return all validated entries.
- Added Object enabled/disabled events to Smart Object lifetime to make it easier to react to the Smart Object enabled status
- Changed FSmartObjectSlotEntranceLocationRequest to be a BP type
- Changed FSmartObjectSlotEntranceLocationRequest.UserCapsule optional to invalid default value to make it easier to interface with BP
- Added FSmartObjectSlotEntranceLocationResult.bIsValid to be able to return results where the validation fails
- Added USmartObjectSubsystem.QueryAllValidatedEntranceLocations() which allows to validate SO definition, but does not require a registered Smart Object (can be used e.g. got object placement UI feedback)
- Added some helpers to allow to reuse validation between multiple methods in USmartObjectSubsystem

[CL 26987173 by mikko mononen in ue5-main branch]
2023-08-10 07:02:20 -04:00
luciano ferraro
4dfa27e83f Exposed a setter/getter SO enable method to the SO Component
[REVIEW] [at]Mikko.Mononen, [at]Yoan.Stamant
[FYI] Phil.Cole, Parker.Linn

[CL 26952120 by luciano ferraro in ue5-main branch]
2023-08-09 07:28:41 -04:00
ben hoffman
40d759dcf7 Add some more Blueprint Functionality to the Smart Object system.
- BP functions for checking if slot handles are equal or not
- to string functions for slots and handles
- is valid functions for slot handles

#rb Yoan.StAmant

[CL 26642750 by ben hoffman in ue5-main branch]
2023-07-27 11:52:42 -04:00
yoan stamant
b428fa6832 Fix CIS Issue 332657: NonUnity build for non editor targets
#rnx

[CL 26442005 by yoan stamant in ue5-main branch]
2023-07-18 14:44:30 -04:00
yoan stamant
45cbedcfbb Fix bad merge
#rnx

[CL 26433126 by yoan stamant in ue5-main branch]
2023-07-18 10:00:46 -04:00
yoan stamant
d05f8826ea [SmartObject] Removed dependency on MassEntity to store slots
#rb mikko.mononen

[CL 26431776 by yoan stamant in ue5-main branch]
2023-07-18 08:42:51 -04:00
yoan stamant
34de3fcdce [SmartObject] replaced icon for collection and actor. Also used for SmartObjectComponent and SmartObjectDefinition
#jira UE-189914
#rb mieszko.zielinski

[CL 26406077 by yoan stamant in ue5-main branch]
2023-07-17 09:41:33 -04:00
ben hoffman
176e409bd8 Add two Smart Object Request Filter options to return claimed and/or disabled slots too
#rb Mikko.Mononen, Yoan.Stamant

#ushell-cherrypick of 26314489 by kristof.morva1

[CL 26329438 by ben hoffman in ue5-main branch]
2023-06-29 17:44:56 -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