Commit Graph

127 Commits

Author SHA1 Message Date
yoan stamant
47369fe7a4 [SmartObject] Validate definition asset on post load
- Enabled GameplayDebuggerCategory in Test builds
- Added debug labels when UE_DEBUG_DRAWING is not defined so at least we can have text at smartobject/slot locations
#jira UE-211487
#rb Mieszko.Zielinski, mikko.mononen

[CL 32853860 by yoan stamant in ue5-main branch]
2024-04-10 08:22:36 -04:00
yoan stamant
aed5727451 [WorldCondition] do not allow move or copy of FWorldConditionContext and FWorldConditionContextData
#rb mikko.mononen, jeff.rubin

[CL 32597651 by yoan stamant in ue5-main branch]
2024-03-28 18:06:32 -04:00
yoan stamant
73e3be5b16 Added unsafe type cast as warnings in AI related plugins/modules: StateTree, Mass, SmartObject. NavigationSystem, and ZoneGraph (partial)
#rb Mieszko.Zielinski, mikko.mononen

[CL 32398227 by yoan stamant in ue5-main branch]
2024-03-21 09:44:11 -04:00
yoan stamant
2b2558905b [SmartObject] fix for slot condition activated multiple times
#rb Luciano.Ferraro

[CL 31568065 by yoan stamant in ue5-main branch]
2024-02-16 11:43:16 -05:00
yoan stamant
0afc38a0ac [SmartObject] fixed slot condition activation
#rb jason.hail

[CL 31534178 by yoan stamant in ue5-main branch]
2024-02-15 15:49:41 -05:00
yoan stamant
d923f77922 [SmartObject] adding support for SmartObjects on actor instances:
- mass tag, fragments to create/destroy smart objects for entities
- project specific interop component for instanced actors
#rb Mieszko.Zielinski, mikko.mononen

[CL 31484049 by yoan stamant in ue5-main branch]
2024-02-14 13:25:25 -05:00
yoan stamant
846104152a [SmartObject] owner component needs to be set before activating world conditions
#rb Luciano.Ferraro
#tests Juno

[CL 31335624 by yoan stamant in ue5-main branch]
2024-02-09 07:47:27 -05:00
yoan stamant
e41fa34cc0 [SmartObject]
- 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]
2024-02-08 10:15:55 -05:00
sebastien lussier
3204fd23a4 World Partition - Fixed minor typos in spelling Partition & Instance
* Partion
* Parition
* Partton
* Intance
* Instace
#rb JeanFrancois.Dube

[CL 31184663 by sebastien lussier in ue5-main branch]
2024-02-05 14:34:34 -05:00
yoan stamant
dd424875a9 [SmartObject] use runtime instance to fetch component for a given handle instead of the smartobject container to not rely on the object path.
#rb mikko.mononen

[CL 31006721 by yoan stamant in ue5-main branch]
2024-01-30 10:11:04 -05:00
aris theophanidis
1b845cc9c3 Improvements in navigation includes
Removing Actor.h from NavigationTypes.h
Removing NavigationQueryFilter.h when unnecessary in headers
And additional non-unity build fixes
#rb Maxime.Mercier

[CL 30621909 by aris theophanidis in ue5-main branch]
2024-01-15 13:31:49 -05:00
mikko mononen
60a5dffa2d StateTree/SmartObjects: fix incorrect use of EFieldIterationFlags::None which prevents inherited struct's properties to be visited.
#rb Mieszko.Zielinski

[CL 30208750 by mikko mononen in ue5-main branch]
2023-12-08 07:31:01 -05:00
mikko mononen
e4b5036e07 SmartObject: Added per object definition data
- added definition data for the whole object
- added GetDefinitionData() & GetDefinitionDataPtr() for the SO definition and slot definition
- Renamed FSmartObjectSlotDefinitionDataProxy -> FSmartObjectDefinitionDataProxy (removed slot)
- Renamed FSmartObjectSlotDefinitionData -> FSmartObjectDefinitionData (removed slot)

[CL 30077219 by mikko mononen in ue5-main branch]
2023-12-04 07:36:52 -05:00
mikko mononen
096756af13 SmartObject: Added claim priority which allows higher priority claims to override lower priority claims.
#rb Yoan.StAmant, Mieszko.Zielinski

[CL 30010180 by mikko mononen in ue5-main branch]
2023-11-30 02:26:33 -05:00
yoan stamant
5e375112b9 [SmartObject] added reasons to control the enabled states of smart objects:
- 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]
2023-11-29 11:23:11 -05:00
mikko mononen
cc737f3eef [SmartObject] Added method to update SO transform
- Added UpdateSmartObjectTransform() to allow to update the Smart Object location at runtime
- Change spatial partitioning Add() to take ref to the handle to avoid alloc when readding

#rb Yoan.StAmant

[CL 29884931 by mikko mononen in ue5-main branch]
2023-11-22 04:49:00 -05:00
ben hoffman
04773d7a0d Add a Find Smart Object from Targeting System request to smart objects. The targeting system is often used for player interactions to determine what the player is "targeting", so being able to find the smart objects that a player is looking at will make using smart objects for player interaction easier!
#jira UE-188874
#rb Yoan.StAmant
#prelight 64f791edf140ae6e397ecdd3

[CL 27611983 by ben hoffman in ue5-main branch]
2023-09-05 16:59:33 -04:00
ben hoffman
8c35dff059 Add Find Smart Object functions that take in AActor's and avoid using the normal QueryBox.
This is more friendly to the UE Gameplay Framework and lets you pass in specific actor's that you case about. If you had to use a spatial query, then you may get results from objects that you don't explictly want if they are overlapping objects.

Add a function to check if the subsystem is running on the server or not to make doing some future replication checks easier

#jira UE-180500
#rb mikko.mononen

[CL 27597760 by ben hoffman in ue5-main branch]
2023-09-05 11:29:58 -04:00
mikko mononen
6c2279e57d SmartObject: Added outliner to asset editor
- Changed Smart Object definition slot data to contain GUI per data (allows to identify the data using ID)
- Added outliner to the editor, displays slots and definition data
- Made slots and definition data selectable in the details view
- Sync selection across details, outliner and 3D view for faster navigation

[CL 27440600 by mikko mononen in ue5-main branch]
2023-08-29 07:48:32 -04:00
yoan stamant
7081abcce2 [SmartObject] replaced a check by verify since we always need the action to be performed
#rnx
#rb trivial

[CL 27284664 by yoan stamant in ue5-main branch]
2023-08-22 16:22:34 -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