Comment on page
Unity - iOS Integration Guide
This doc introduce the integration steps for Unity games with export to iOS platform.
- Unity (game engine)
- Visual Studio (IDE)
- C# (logic)
- required: Xcode
Unity Version: 2019.3.6f1
Install Unity Modules In Unity Hub:
- Download zip file and place everything into
plugin/iosfolder in your unity project
- Drop the
CelerUnityBridge.csfile anywhere in your workspace, that will be your briging file that communicates with Celer Game Sdk
- In most cases, unity will embed every depedencies with your project, if not, go head and embed everything in the
framework/plugin/iosfolder, but with one exception
Do not embed(or
Linkfor older versions of xcode)
-- You can either setup your permissions in with your unilty plugin, or modify the iOS project exported by the Unity project
Unfornunately, you will have to disable bitcode if your are using Unity version 2019.3.6f1 or above. Since newer versions of unity have bitcode enabled by default.
Disable bitcode in the exported xcode project
Give a welcome scene in your game. Call launchCelerXUI API in welcome scene script while start game button be triggered.
set listener to you game life cycle
public class MatchInfo
public string shouldLaunchTutorial;
public string matchId;
public double sharedRandomSeed;
public GamePlayer currentPlayer;
public List<GamePlayer> players;
public class GamePlayer
public string playerId;
public string fullName;
public string playIndex;
If game has been loaded and game rendering was finished, developers must call ready function to confirm game can be start, then CelerX will show a ready button in match view for player.
public interface ICelerXMatchListener
* This Function will be callback to C sharp after CelerX platform has match player finishing.
Developers can get any match information from param `MatchInfo`, such as players information and sharedRandomSeed. Developers must give ui rendering in this callback.
void onMatchJoined(MatchInfo mathInfo);
* Calling after player clicking ready button and CelerX platform confirmed everything is ready, game can start now.
This is when a match is generated for the game, use the random seed to generate your level and preload your game, when you game has been loaded, call CelerUnityBridge.LevelLoaded() to notify the sak
This method will be called when "Ready" button has been clicked and CelerX has confirmed that everything is ready, It indicates that game can start now. Users will see your game scene here. Put your game start logics here.
When the game is over, call this API to submit final score to CelerX platform
Screen Shot 2020-09-18 at 2 11 08 PM
- For a pure OC project target before ios 12.2, please enable
Always Embed Swift Standard Librariessettings [https://stackoverflow.com/questions/55364816/with-swift-5-and-ios-12-2-should-i-change-always-embed-swift-standard-librarie]
- Minimuim sdk requirement is iOS 11