In Visual Studio, inside of the Solution/CocosGettingStarted/src folder, Open HelloWorldScene.h and replace the contents with this:.This guide provides the minimum steps to make your first PlayFab API call. Installation complete! Set up your first API call Your CocosGettingStarted project should now compile (and even run), but we are not yet making any PlayFab API calls. We are adding curl and zlib, which are libraries that come with Cocos, but are not enabled by default. %(AdditionalIncludeDirectories) $(_COCOS_HEADER_WIN32_BEGIN) $(_COCOS_HEADER_WIN32_END). $(ProjectDir).\cocos2d\external\zlib\include $(ProjectDir).\cocos2d\external\curl\include\win32 $(EngineRoot)cocos\audio\include $(EngineRoot)external $(EngineRoot)external\chipmunk\include\chipmunk $(EngineRoot)extensions. Replace the Additional Include Directories with this: Open the Properties window for your CocosGettingStarted project (as shown below). PlayFab uses several Cocos libraries that have to be manually added to the dependencies list. ![]() You should see these files in your VS project: If you experience problems, you can drag and drop each file one at a time, just be careful and get all of them. This guide will refer to that directory location as /Classes, EXCEPT AppDelegate.h, AppDelegate.cpp, HelloWorldScene.h, HelloWorldScene.cppĭrag and drop all of those files from Explorer, onto the Visual Studio Solution/CocosGettingStarted/src folder we found above. If successful, there will be a new folder CocosGettingStarted.If you get a message that "'cocos' is not recognized as an internal or external command", you have not configured the cocos installation correctly (Go back to the Cocos windows installation guide).Make sure your target sub-directory ( CocosGettingStarted) does not already exist - This command will fail if the folder already exists.In the new console window enter this command: Hold down your Shift key, and right-click in the empty white space of the Explorer window. Open a command window in your parent folder (Cocos CLI will create the actual project directory) Navigate to a location where you wish to store your Cocos project ![]() Once you have Cocos2d-x configured, create a project using the Cocos CLI: Visual Studio 2013 or 2015 are also required.Setting up Cocos2d-x requires some familiarity.Visual Studio 2013 will have identical steps, but the screenshots provided here will look a bit different from yours. If you are building for other platforms, the files you need are the same, but you will need to do the project setup yourself. The installation instructions are similar, but different for each combination. Cocos works on most modern OSs and environments. ![]() OS: This guide is written for Windows 10, using Visual Studio 2015. This quickstart assists you in making your first PlayFab API call in the Cocos2d-x engine.īefore you can call any PlayFab API, you must have a PlayFab developer account.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |