Skip to content

NDark/ndinfrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ndinfrastructure

An infrastructure libraries for Unity & C#

Brief

Clone and checkout specified branch of this repository, use only limited functionality of following features without checkout entire irrelavant class and libraries.

Usage

Use git submodule to add submodule from this repository and specify a branch name to use only that feature.

Features

  1. F_ABFetcher : Asset Bundle Loader ( official plugin included: https://assetstore.unity.com/packages/tools/utilities/assetbundle-manager-example-scenes-45836 )
    1. Provide a asset bundle loader ABFetcherLoaderBase to initialized asset bundle, and to be called as a loader.
    2. Provide a loading script ABDownloaderBase with states to check all specified bundle files.
    3. Inherited Classes :
      1. AssetBundleManager: Official asset bundle manager (static).
      2. LoaderExample: use AssetBundleManager, to provide handler after the protected methods are called. ( ex. LoadAssetAsync_Callback )
      3. ABFetcherLoaderBase: Inherited from LoaderExample, and provide public method to be called by other process.
      4. ABDownloaderBase: Abstract class that is inherited from ABFetcherLoaderBase with states to be ready to check a list of CheckItem.
      5. ABDownloader: Inherited from ABDownloaderBase to use ABSetupInfo to check the versions of each bundles.
    4. Besides load asset handler and level handler, provide bundle loading handler.
  2. F_ConversationManager : Conversation(dialogs) manager
    1. A conversation manager traverse all stories and takes.
    2. Story: a indices of takes.
    3. Take: all information to present a take.
  3. F_DataCenter : Generic data storage to save all data as string.
    1. Use data storage to check basic conditions be triggered.
  4. F_EditorTools :
    1. version incrementation and set to project setting. by a file Assets/Resources/version.txt
    2. Clean caching by Caching.CleanCache() or Caching.ClearCache().
    3. Delete playerprefs by PlayerPrefs.DeleteAll()
    4. font replacement among UnityEngine.UI.Text or GUIText by selected Font
  5. F_EnumConverter : Genric enum converter to integer EnumIntConverter and string EnumStrConverter
  6. F_MathTools : [DotNet] float equal by specified value and float.Epsilon
  7. F_SpreadSheetLoader :
    1. load a tab base table to List< string [] >.
  8. F_StateMachine : State machine with recording time and calling transition methods.
  9. F_SystemDateTime : [DotNet] Time convertion from Date(-62135596800000) to System.DateTime
  10. F_Timer : count down timer CountDownTimer with functionalities of Active(), Rewind(), Pospone(), ElapsedTime(), RemainingTime()
  11. Platform(iOS&Android)
    1. F_PlatformString: Conversation between NSString* and char* _String in iOS
    2. F_Clipboard: Clip and paste between clipboard (iOS by UIPasteboard, Android by android.content.ClipData.)
    3. F_PlayerSettingTools: project setting tools, set UnityEditor.PlayerSettings.bundleVersion, and short vertion of iOS by CFBundleShortVersionString

F_NGUIUTil

An utility for NGUI (need to depend on NGUI plugin)

  1. DisplayFPS.cs : use UILabel to display a average/min/max FPS of Time.deltaTime.
  2. NGUIPanelHelper.cs : Use NGUIUICollector to collect UI component and update them.
  3. NGUIUICollector.cs : To collect UILabel and UISprite in dictionary.
  4. NGUIInvokeButton.cs : As OnClick() has been called, call the OnClick() of specified UIButton.
  5. OnEscapeInvokeNGUIButtons.cs : Vis KeyCode.Escapem calling OnClick() to a button by a stack with push/pop.
  6. SetNGUILocalization and NGUISetLocalization.cs : set Localization.language.

F_UnityTools

  1. ClickOpenFacebookApp.cs : OnClick() to open facebook with checking app existence.
  2. CoordinateTools.cs : Update2DFrom3DWorldPos() Coordinate calculation from 2d to 3d.
  3. DontDestroyGameObject.cs : Automatically set not destroy game object at beginning by using GameObject.DontDestroyOnLoad()
  4. OnClickChangeScene.cs : By OnClick() to change scene by UnityEngine.SceneManagement.SceneManager.LoadScene()
  5. OnClickOpenBrower.cs : By OnClick() to open browswer, support web player, WebGL player, and other platforms.
  6. OnDoubleEscapeLeaveGame.cs : double escape leaving game by Application.Quit().
  7. OnEscapeLeaveGame.cs : Chheck pressing escape(KeyCode.Escape) to leave game by Application.Quit().
  8. UnityFind.cs : find gameobject and component under gameobject.
  9. WaitSecChangeScene.cs : wait seconds and change scene by using UnityEngine.SceneManagement.SceneManager.LoadScene()

P_ClassGen

  1. A console project which generates C# class by a definition file.
  2. Export SimpleJSONHelper to parse from SimpleJSON.JSONNode to class.
  3. Export a SeqOperatorSimpleJSON from a collector of SeqOperatorBase

Definition of format

Class:DataClass
Protocol:DataController
int a
string b
float c

P_CSVToJSON

  1. Execute file.
  2. Parse csv file to JSON structure array.

P_GoogleSpreedSheetToJSON

  1. (need to logon google account to access file)
  2. Execute file.
  3. Load google spreed sheet to a JSON file.

P_JSONParsersPerformance

  1. Execute file.
  2. Benchmark of performance of several C# compatible JSON methods

P_LocalConversationManager

  1. Execute file.
  2. An implementation of Conversation Manager.

T_SystemDateTime

  1. need to depend on Unity Test Environment
  2. A Test of F_SystemDateTime.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published