UnityEditor.NetworkManagerEditor.GetSceneObject C# (CSharp) Method

GetSceneObject() protected method

protected GetSceneObject ( string sceneObjectName ) : SceneAsset
sceneObjectName string
return SceneAsset
        protected SceneAsset GetSceneObject(string sceneObjectName)
        {
            if (!string.IsNullOrEmpty(sceneObjectName))
            {
                foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes)
                {
                    if (scene.path.IndexOf(sceneObjectName) != -1)
                    {
                        return (AssetDatabase.LoadAssetAtPath(scene.path, typeof(SceneAsset)) as SceneAsset);
                    }
                }
                if (LogFilter.logWarn)
                {
                    Debug.LogWarning("Scene [" + sceneObjectName + "] cannot be used with networking. Add this scene to the 'Scenes in the Build' in build settings.");
                }
            }
            return null;
        }