Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tangzx committed Jun 3, 2016
1 parent 1e2623f commit a38ee84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
12 changes: 1 addition & 11 deletions Assets/Scripts/Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void Start()

void LoadObjects()
{
manager.Load("Assets.Prefabs.Sphere.prefab.ab", (a) =>
manager.Load("Assets.Prefabs.Sphere.prefab", (a) =>
{
GameObject go = Instantiate(a.mainObject) as GameObject;//a.Instantiate();
go.transform.localPosition = new Vector3(3, 3, 3);
Expand All @@ -37,14 +37,4 @@ void LoadObjects()
// go.transform.localPosition = new Vector3(12, 3, 3);
//});
}

void OnGUI()
{
if (GUI.Button(new Rect(0,0, 100, 100), "GC"))
{
manager.UnloadUnusedBundle();
Resources.UnloadUnusedAssets();
System.GC.Collect();
}
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ void Start()

void LoadObjects()
{
manager.Load("Assets.Prefabs.Sphere.prefab.ab", (a) =>
manager.Load("Assets.Prefabs.Sphere.prefab", (a) =>
{
GameObject go = a.Instantiate(); //自动管理:当go被Destroy时,AB会被释放回收
});

manager.Load("Assets.my_txture.png.ab", (a) =>
manager.Load("Assets.my_txture.png", (a) =>
{
// a.Retain(); //强制引用计数加一
// a.Release(); //引用计数减一
Expand Down

0 comments on commit a38ee84

Please sign in to comment.