Skip to content

Commit

Permalink
Update JPrefab.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonXuDeveloper committed May 22, 2022
1 parent 17855f9 commit 3e4ddc7
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions UnityProject/HotUpdateScripts/JEngine/Core/JPrefab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,33 @@ public class JPrefab: IDisposable
/// 从热更资源里读取prefab
/// </summary>
/// <param name="path"></param>
public JPrefab(string path, bool async = false) : this(path, async, null)
public JPrefab(string path, bool async = false) : this(path, null, async, null)
{

}

/// <summary>
/// Load a prefab from hot update resources (async)
/// 从热更资源里读取prefab (异步)
/// Load a prefab from hot update resources
/// 从热更资源里读取prefab
/// </summary>
/// <param name="path"></param>
/// <param name="complete">Action<bool,JPrefab>, success 与 JPrefab</param>
public JPrefab(string path, Action<bool, JPrefab> complete = null) : this(path, true, complete)
public JPrefab(string path, string package, bool async = false) : this(path, package, async, null)
{

}

public JPrefab(string path,string package, Action<bool, JPrefab> complete = null) : this(path,package, true, complete)
/// <summary>
/// Load a prefab from hot update resources (async)
/// 从热更资源里读取prefab (异步)
/// </summary>
/// <param name="path"></param>
/// <param name="complete">Action<bool,JPrefab>, success 与 JPrefab</param>
public JPrefab(string path, Action<bool, JPrefab> complete = null) : this(path, null, true, complete)
{

}

public JPrefab(string path, bool async, Action<bool, JPrefab> complete) : this(path,null, true, complete)
public JPrefab(string path,string package, Action<bool, JPrefab> complete = null) : this(path,package, true, complete)
{

}
Expand Down

0 comments on commit 3e4ddc7

Please sign in to comment.