Why i cant include <ISystem.h>?

I want to access gEnv to run gEnv->pSystem->GetViewCamera().Unproject(Vec3(position.x, invMouseY, 0.0f), s0). But vs studio cant find ISystem.h.
xxx
How should i do?

hi! how your wscript file looks like?
I think it’s should include some paths for using this
for instance

        includes    = [ bld.Path('Code/CryEngine/CryCommon'),
                        bld.Path('Code/CryEngine/CryAction')
                      ],

also you can try add
#include <platform_impl.h>
to YourProjectModule.cpp file

here is how looks minimal module to initialize gEnv
wscript - https://pastebin.com/CXxwbfdE
testproject1.waf_files - https://pastebin.com/J4FBmP6M
TestProject1Module.cpp - https://pastebin.com/jzRuFGfb
TestProject1_precompiled.h - https://pastebin.com/BAcjEuqr

probably to enable this you will needed delete your solution from dev\Solutions\ dir
and then generate it again for existed project

  1. cd Bin64vc141
  2. lmbr projects create_vs_solution TestProject 1
    if your wscript do not have any typos it’s just regenerate solution for your TestProject

also iirc there was special Ebus event for getting - gEnv

1 Like

thanks,it works …