Beispiel #1
0
 /// <summary>
 /// Gets a scene reference for the specified asset path;
 /// </summary>
 /// <param name="assetPath">
 /// The asset path of the scene.
 /// </param>
 public static SceneReference GetSceneReference(string assetPath)
 {
     return(
         Mode == SceneMapMode.Editor ?
         SceneMapEditorAdaptor.GetSceneReference(assetPath) :
         SceneMapPlayerAdaptor.GetSceneReference(assetPath)
         );
 }
Beispiel #2
0
 /// <summary>
 /// Gets the asset bundle name for the specified scene.
 /// </summary>
 /// <param name="guid">
 /// The guid of the scene.
 /// </param>
 /// <returns>
 /// <c>null</c> if the scene is not in an asset bundle.
 /// </returns>
 public static string GetAssetBundleName(string guid)
 {
     return(
         Mode == SceneMapMode.Editor ?
         SceneMapEditorAdaptor.GetAssetBundleName(guid) :
         SceneMapPlayerAdaptor.GetAssetBundleName(guid)
         );
 }
Beispiel #3
0
 /// <summary>
 /// Gets the scene path for the specified scene.
 /// </summary>
 /// <param name="guid">
 /// The guid of the scene.
 /// </param>
 /// <remarks>
 /// The scene path is different depending on where the scene is being loaded
 /// from. When the scene is being loaded from an asset bundle <see cref="SceneManager.LoadScene" />
 /// only works if you pass the name of the scene. When the scene is being loaded
 /// normally, <see cref="SceneManager.LoadScene" /> works if you pass the name
 /// or path of the scene (as of Unity 5.3.4f1).
 /// </remarks>
 public static string GetScenePath(string guid)
 {
     return(
         Mode == SceneMapMode.Editor ?
         SceneMapEditorAdaptor.GetScenePath(guid) :
         SceneMapPlayerAdaptor.GetScenePath(guid)
         );
 }
Beispiel #4
0
 /// <summary>
 /// Gets a flag that indicates whether the scene map contains information about the specified scene.
 /// </summary>
 /// <param name="guid">
 /// The guid of the scene.
 /// </param>
 public static bool Contains(string guid)
 {
     return(
         Mode == SceneMapMode.Editor ?
         SceneMapEditorAdaptor.Contains(guid) :
         SceneMapPlayerAdaptor.Contains(guid)
         );
 }