@@ -40,6 +40,32 @@ namespace CsvSpawner::CsvSpawnerUtils
40
40
->Field (" Transform" , &CsvSpawnableEntityInfo::m_transform)
41
41
->Field (" Name" , &CsvSpawnableEntityInfo::m_name)
42
42
->Field (" Seed" , &CsvSpawnableEntityInfo::m_seed);
43
+
44
+ if (AZ::EditContext* editContext = serializeContext->GetEditContext ())
45
+ {
46
+ editContext->Class <CsvSpawnableEntityInfo>(" Csv Spawnable Entity Info" , " An entity configuration for spawning" )
47
+ ->ClassElement (AZ::Edit::ClassElements::EditorData, " " )
48
+ ->DataElement (AZ::Edit::UIHandlers::Default, &CsvSpawnableEntityInfo::m_id, " ID" , " Optional ID for the entity" )
49
+ ->DataElement (
50
+ AZ::Edit::UIHandlers::Default, &CsvSpawnableEntityInfo::m_transform, " Transform" , " Transform of the entity" )
51
+ ->DataElement (
52
+ AZ::Edit::UIHandlers::Default,
53
+ &CsvSpawnableEntityInfo::m_name,
54
+ " Name" ,
55
+ " Name of the spawnable entity configuration" )
56
+ ->DataElement (
57
+ AZ::Edit::UIHandlers::Default, &CsvSpawnableEntityInfo::m_seed, " Seed" , " Optional seed value for randomization" );
58
+ }
59
+ }
60
+
61
+ if (auto * behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
62
+ {
63
+ behaviorContext->Class <CsvSpawnableEntityInfo>(" CsvSpawnableEntityInfo" )
64
+ ->Constructor <>()
65
+ ->Property (" Id" , BehaviorValueProperty (&CsvSpawnableEntityInfo::m_id))
66
+ ->Property (" Transform" , BehaviorValueProperty (&CsvSpawnableEntityInfo::m_transform))
67
+ ->Property (" Name" , BehaviorValueProperty (&CsvSpawnableEntityInfo::m_name))
68
+ ->Property (" Seed" , BehaviorValueProperty (&CsvSpawnableEntityInfo::m_seed));
43
69
}
44
70
}
45
71
void CsvSpawnableAssetConfiguration::Reflect (AZ::ReflectContext* context)
@@ -360,8 +386,15 @@ namespace CsvSpawner::CsvSpawnerUtils
360
386
361
387
if (auto * behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
362
388
{
389
+ behaviorContext->EnumProperty <static_cast <int >(CsvSpawnerUtils::SpawnStatus::Success)>(" SpawnStatus_Success" );
390
+ behaviorContext->EnumProperty <static_cast <int >(CsvSpawnerUtils::SpawnStatus::Fail)>(" SpawnStatus_Fail" );
391
+ behaviorContext->EnumProperty <static_cast <int >(CsvSpawnerUtils::SpawnStatus::Stopped)>(" SpawnStatus_Stopped" );
392
+ behaviorContext->EnumProperty <static_cast <int >(CsvSpawnerUtils::SpawnStatus::Warning)>(" SpawnStatus_Warning" );
393
+
363
394
behaviorContext->Class <SpawnInfo>(" SpawnInfo" )
364
395
->Constructor ()
396
+ ->Attribute (AZ::Script::Attributes::Category, " CsvSpawner" )
397
+ ->Attribute (AZ::Script::Attributes::Module, " editor" )
365
398
->Property (" m_entitiesToSpawn" , BehaviorValueProperty (&SpawnInfo::m_entitiesToSpawn))
366
399
->Property (" m_physicsSceneName" , BehaviorValueProperty (&SpawnInfo::m_physicsSceneName))
367
400
->Property (" m_spawnerParentEntityId" , BehaviorValueProperty (&SpawnInfo::m_spawnerParentEntityId));
0 commit comments