CMessageDataSheetMgr

It is an object that is used to manage the string resources.

CMessageDataSheet corresponds to the an Excel sheet .

CMessageDataSheetMgr is the container of CMessageDataSheet.

Just CMessageDataSheetMgr corresponds to an Excel file .

How to use in your application

You need to add this script by addManager in “Awake” method of CMainSystem.

public class CMainSystem : CMainSystemBase {
   //==========================================================================
    /*!Awake
    * @brief   Unity Callback
    */
    new void Awake() {
        base.Awake();

        if (m_instance != null) {
            Debug.LogError("already exist CMainSystem");
            return;
        }
        m_instance = this;

        // Add Component
        gameObject.AddComponent<CInput>();
        gameObject.AddComponent<CAssetBundleMgr>();
        gameObject.AddComponent<CSpriteFontMgr>();
        gameObject.AddComponent<CTextureResourceMgr>();
        gameObject.AddComponent<CWindowMgr>();
        gameObject.AddComponent<CBgmResourceMgr>();
        gameObject.AddComponent<CSeResourceMgr>();
        gameObject.AddComponent<CSoundEffectMgr>();

        addManager(new CMessageDataSheetMgr(Utility.getSystemLocale()));
    }

Also, if you want to associate it with the caption of CWindowMgr, you need to describe as follows in the initialize of CMainSystem.

public class CMainSystem : CMainSystemBase {
   //==========================================================================
   /*!Initialize
   * @brief    initialize
   */
   override protected void initialize() {
       base.initialize();

       //--------------------------------------------
       // WindowMgr initialize.
       //--------------------------------------------
       CWindowMgr      cWindowMgr = CWindowMgr.Instance;
       // initialize caption interface
       cWindowMgr.captiondata = CMessageDataSheetMgr.Instance.find(new FiveCC("WNDW"));

Since CMessageDataSheetMgr has a IWinCaptionData interface , this is possible .

class CMessageDataSheetMgr

CMessageDataSheetMgr is a container of CMessageDataSheet.

CMessageDataSheet corresponds to the an Excel sheet .

In other words,CMessageDataSheetMgr is the container of your Excel sheets.

However,the assetbundle of string resource has only one locale.(it does not have multiple locale data).

void initialize (Byte[] buffer)
Param byte[] buffer

Binary data read

Specifies binary data generated from Excel.

CMessageDataSheet find (UInt32 sheetname)
Param uint type

Pass the sheet name with FiveCC.

Gets one sheet.

CMessageDataSheet cSheet = cMessageDataSheetMgr.find(new FiveCC("WNDW");

Get the currently set locale .

Gets an instance of CMessageDataSheetMgr.

class CMessageDataSheet

It corresponds to the one sheet on an Excel file.

String find (UInt32 id)
Param uint id

Specifies MultiID and retrieves text resources.

String format (UInt32 id, params object[] args)
Param uint id

Specifies MultiID and retrieves text resources.

Param params object[] args

variable argument

Generates and returns a character resource according to the format.

string str = cMessageDataSheetMgr.format(new MulId(0,0,1),"Test",n,value);