Entity component array expose for editor

#1
Hi. I need some help. I need to create specific type of array in my component, that I will access in editor later. Now.. the issue about it is, that most of the arrays in Schematyc:: namespace don't work.
Okay, I managed to create array of strings or ints, for example:

Code: Select all

Schematyc::CArray<Schematyc::CSharedString> arrayOfStrings;
//then I simply add member in reflect type function:
desc.AddMember(&SPropertyClass::arrayOfStrings, 'arof', "Array", "StringArray", "", Schematyc::CArray<Schematyc::CSharedString>());
And it works just fine. I can access it in editor and add items to array. But what I actually need is specific type of array.
In the best case I need array where each element will contain Schematyc::GeomFileName and Schematyc::MaterialFileName. Is it possible at all?
What I would also be happy with would be array of geometry files only. This would be fine too.
I tried:

Code: Select all

Schematyc::CArray<Schematyc::GeomFileName>
just like before, but it won't compile. And yes, I double and triple checked if my syntax is correct, and if I do it as it should. So there is no typo.
I looked also into other arrays lilke Schematyc::CHybridArray and all of other array types, but norhing. They won't even compile.
Any ideas?
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Re: Entity component array expose for editor

#6
I managed to get Schematyc::CArray<Schematyc::CSharedString> working for me, but not really sure about any other types using a CArray. It should be possible to have any type exposed as long as it has a Serialize function - but I was so damn grateful the moment I got Schematyc::CArray<Schematyc::CSharedString> to work I wept quietly in a corner and moved onwards :D

Re: Entity component array expose for editor

#8
To answer your last question this is an example of getting access to the sensorvolume plugins' interface:

Code: Select all

#include <../../CryPlugins/CrySensorSystem/Interface/ICrySensorSystemPlugin.h>
#include <../../CryPlugins/CrySensorSystem/Interface/ISensorSystem.h>
#include <../../CryPlugins/CrySensorSystem/Interface/ISensorMap.h>
#include <CryExtension/ICryPluginManager.h>

void someFunc()
{
if (auto pSensorPlugin = gEnv->pSystem->GetIPluginManager()->QueryPlugin<ICrySensorSystemPlugin>())
{
// Do stuff
}
}
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 0 guests