Skip to content

Instantly share code, notes, and snippets.

@aldidoanta
Last active January 18, 2016 11:06
Show Gist options
  • Save aldidoanta/a263c75eebc21319a7f4 to your computer and use it in GitHub Desktop.
Save aldidoanta/a263c75eebc21319a7f4 to your computer and use it in GitHub Desktop.

TT-Core Documentation

The core module of Touchten Framework

Getting Started

This module must be installed using Touchten Framework Wizard.

Installation Instructions Using Touchten Framework Wizard

  • Add this .gitignore file to the root folder of your Unity project (the one where you can see [Assets], [Library], and [ProjectSettings] folders).
  • Make sure that node and npm are already installed. Otherwise, download the latest Node.JS.
  • Open Terminal (if on MacOSX) or PowerShell (if on Windows). Navigate to the root folder of your Unity project.
  • Make sure that gulp is installed. To install gulp using npm, type npm install -g gulp.
  • Type npm init to create a package.json file. Fill in all the required fields, or just press Enter to skip and fill those fields with default values.
  • Type npm install framework-wizard --save-dev --registry https://npm-proxy.fury.io/ssosQFhhaV_W1TxxJRdp/touchten/.
  • Choose the modules you want to install. You can select multiple modules by using the Space button.
  • The wizard will continue to install the modules and modify your AndroidManifest.xml.

About Updating the Touchten Framework
Framework wizard will not sync automatically with your existing plugins. You have to reorganise the required files for your plugin and editor manually. See notes below for more information.

About npm commands

  • npm install <package name> is used to install a package on your machine. A package can be installed either locally on your project, or globally on your machine. By using the -g option, the package will be installed globally. Using the —-registry option will refer to custom npm registry instead of npm’s default registry.
  • package.json contains package dependencies for your project. Using --save-dev option when installing packages will add them to “devDependencies” in package.json. This way, other team members who clone the project will simply use npm install, and npm will read the required dependencies from package.json.
  • Please take a look at npm-install doc for more information about npm install command, and package.json doc for more information about package.json.

About gulp

  • In Touchten Framework Wizard, gulp is used for some post-processing after the project has been cloned.
  • If some modules are not working, make sure that gulp has been installed successfully.

Touchten Framework Settings in Unity

  • After the framework has been installed, open your Unity project.
  • Make sure the selected platform for your Unity project is Android. Open File > Build Settings. Select Android, then press Switch Platform.

Notes

  • Some settings come with default key from testsdk. Replace the default key with the appropriate one for each module.
  • Your existing [Plugins] folder will be backed up to [PluginsBackup] folder.
  • Your existing [Editor] folder will be backed up to [EditorBackup] folder.
  • Raw module files will be downloaded into [ModulesTemp] folder in your Unity project root.
  • Any other android-support-v4.jar and google-play-services.jar files outside from the ones that are specified in TT-Core module will be deleted as there must not be any duplicates for these files. However, you can still find your old files inside the [PluginsBackup] folder.
  • This SDK will overwrite your existing AndroidManifest.xml, however your original AndroidManifest.xml will be backed up as AndroidManifest.xml.bak in the same folder.
  • You still need to edit the AndroidManifest.xml file to fill in some required information. Please do take a look inside Assets/Plugins/Android/AndroidManifest.xml file for further instructions.

###Reference to Other Modules

TT-Advertisement
TT-Analytics
TT-IAP
TT-PushNotification
TT-Social

###Table of Contents

Example
Classes in TT-Core
ChangeLog


###Method Usage Example

Add namespace

using Touchten.Core

TTCore Init Method Call

TTCore.Init((result, ex) =>
{
    if (ex != null){
        logViewObj.text = ex.Message;
    }
    logViewObj.text = result.ToString();	
});

###Classes

####TTCore

Method:

void Init(Action<bool, Exception> callback)

##ChangeLog version 1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment