diff --git a/Assets/QFramework/Framework/2.ResKit/Document.md b/Assets/QFramework/Framework/2.ResKit/Document.md index ad3bf7439..7c1af72da 100644 --- a/Assets/QFramework/Framework/2.ResKit/Document.md +++ b/Assets/QFramework/Framework/2.ResKit/Document.md @@ -31,15 +31,19 @@ loader = null; ``` csharp // init res mgr before load asset bundle ResMgr.Init(); + // allocate a loader when initialize a panel or a monobehavour var loader = ResLoader.Allocate(); // load someth in a panel or a monobehaviour -loader.LoadSync("smobj") +var smObjPrefab = loader.LoadSync("smObj"); + +var bgTexture = loader.LoadSync("Bg"); -loader.LoadSync("Bg") +var logoTexture = loader.LoadSync("hometextures","logo"); // resycle this panel/monobehaivour loaded res when destroyed -loader.Recycle2Cache() -loader = null +loader.Recycle2Cache(); + +loader = null; ```