1.0.5 • Published 1 year ago
tw.funique.core v1.0.5
Funique Core Module
Contain basic calculation and low level algorithm, The core library should contain both client and server commom knowledge, like account sturcture, enum, some abstract class.
This is the make should server and client can communicate with each other, most of unity project should include this module.
Features
- Logger
- Funique Application Enums
- Tool Utility Class
- EnumCycle
- Serialization
- CoroutineHelper
Guide
- Register a logger
void Start(){
FuniqueLogger.Init();
FuniqueLogger.Log("This will log", "Main");
}
You can select the log mode
void Start(){
// This will only use build unity log, not output the message to file
FuniqueLogger.Init(LoggerApply.Unity);
FuniqueLogger.Log("This will log", "Main");
}
- EnumCycle guide
It will loop base on the index it got, This does not support unorder enum.
enum SomeEnum{
None,
First,
Second,
Thrid
}
EnumCycle<SomeEnum> sample = new EnumCycle<SomeEnum>();
int current = 0;
void Start(){
for(int i = 0; i < 10; i++){
current = sample.Next(current);
Debug.Log(current);
}
// output: 0
// output: 1
// output: 2
// output: 3
// output: 0
// output: 1
// output: 2
// output: 3
// output: 0
// output: 1
}
- Coroutine explain
Help thoes class which need access unity monobehaviour coroutine feature.
Don't forget add CoroutineHelper to any gameobject in the scene, it will assign to static instance member.
class SampleA {
void Use(){
Coroutine coroutine = CoroutineHelper.Instance.Run(Go);
}
IEnumerator Go(){
yield return new WaitForEndOfFrame();
}
}
Roadmap
v1.0.3 Comments Update Added Test scripts
v1.0.2 Added ABR smooth Added Audio
v1.0.1 Added Extensions Added Drawer * Added Info structure
v0.1.0
- Added Logger features
- Added Enums
- Added Tool class
- Added EnumCycle class
- Added Serialization class
- Added CoroutineHelper class