Page 1 of 2

Cryengine 5.4 error to reflect schematyc entity c++

Posted: Sun Sep 24, 2017 8:51 pm
by pequenosoldado
Hello
When I compile the following code I get this error

ERROR

Code: Select all

C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.4\Code\CryEngine\CryCommon\CrySchematyc/Env/Elements/EnvComponent.h(76): error C2338: Type must be reflected, see TypeDesc.h for details! 1>C:/Users/NeoGames/Documents/CRYENGINE Projects/SilentHillRemake/Code/Components/timeOfDay/TimeOfDay.cpp(10): note: vea la referencia a la creación de instancias de plantilla de función 'std::shared_ptr<Schematyc::CEnvComponent<CTimeOfDayComponent>> Schematyc::EnvComponent::MakeShared<CTimeOfDayComponent>(const Schematyc::SSourceFileInfo &)' que se está compilando 1>C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.4\Code\CryEngine\CryCommon\CrySchematyc/Reflection/TypeDesc.inl(522): error C2338: Type must be reflected, see TypeDesc.h for details! 1>C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.4\Code\CryEngine\CryCommon\CrySchematyc/Env/Elements/EnvComponent.h(55): note: see the reference to the creation of function template instances 'const Schematyc::CTypeDesc<CTimeOfDayComponent,void> &Schematyc::GetTypeDesc<COMPONENT>(void)' which is being compiled 1> with 1> [ 1> COMPONENT=CTimeOfDayComponent 1> ] 1>C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.4\Code\CryEngine\CryCommon\CrySchematyc/Env/Elements/EnvComponent.h(54): note: during the compilation of the member function template class of 'const CEntityComponentClassDesc &Schematyc::CEnvComponent<CTimeOfDayComponent>::GetDesc(void) const' 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\type_traits(477): note: see the reference to the creation of template instances of class 'Schematyc::CEnvComponent<CTimeOfDayComponent>' which is being compiled 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\memory(1345): note: see the reference to the creation of template instances of class 'std::is_convertible<_Ty2 *,_Ty *>' which is being compiled 1> with 1> [ 1> _Ty2=Schematyc::CEnvComponent<CTimeOfDayComponent>, 1> _Ty=Schematyc::IEnvElement 1> ] 1>Compilación del proyecto "Game.vcxproj" terminada -- ERROR.
TimeOfDay.cpp
Captura de pantalla (57).png
Captura de pantalla (57).png (147.78 KiB) Viewed 1869 times
TimeOfDay.h
Captura de pantalla (56).png
Captura de pantalla (56).png (80.09 KiB) Viewed 1869 times

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Mon Sep 25, 2017 6:23 am
by fury22uk
Show me cmake lists screen shot

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Mon Sep 25, 2017 7:19 am
by cry-alex
Hello,

you have a typo in your ReflectType function. Your function is called "RefelctType" instead of "ReflectType" that's why the engine can't find the function. Just correct the name and recompile the solution and it should work fine now. I hope that's solves your issue.

Cheers,
Alex

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Mon Sep 25, 2017 7:42 am
by fury22uk
This is how you recognise experienced coder :D

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Mon Sep 25, 2017 3:59 pm
by pequenosoldado
LOL and I thinking it was more complex but now there is a mistake, this time it is in the editor.

when I add the entity to my level, save, close and reopen it tells me that the layer is corrupted by removing everything that has this layer

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Mon Sep 25, 2017 11:16 pm
by mknmknmknjk
try create a new level.

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Tue Sep 26, 2017 12:11 am
by pequenosoldado
Try to create new level, and new project none of the 2 worked

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Tue Sep 26, 2017 4:13 am
by mknmknmknjk
search RefelctType in source code and try change guid.

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Tue Sep 26, 2017 7:32 am
by cry-alex
Can you describe your problem more detailed ? Which component does this entity have ? Does it have any Schemtayc logic ? Do you have any other object in the level ? It would also help if you could upload the layer file which can be found under MyProject\Assets\levels\example\layers\main.lyr so I can maybe see what the problem is.

Cheers,
Alex

Re: Cryengine 5.4 error to reflect schematyc entity c++

Posted: Tue Sep 26, 2017 11:05 am
by pequenosoldado
The entity is the one who previously believes "Time of day" schematic logic does not have.
components added to this entity none

objects in the level are those that come in the example level template blank

the entity was in the Entities layer

error that appears on the console

////////////////////////////////////////////////////////
[Warning] XML reader: not well-formed (invalid token) at line 17 (assets/levels/example\Layers/Entities.lyr)
[Error] Failed to import layer file 'assets/levels/example\Layers/Entities.lyr'
////////////////////////////////////////////////////////
File Entities.lyr
https://drive.google.com/open?id=0B2LJr ... Hk3c09KOGs

Edit:

Do not listen to me and I found the error
in ReflectType
when I add the members leave space between words in the names
Example:
"Update Force" :lol:


Thank you very much for your help cry_alex