Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: dudebxl on April 22, 2016, 04:03:45 PM
-
Scene Manager actions for Unity 5.3.4 or newer.
Info: http://docs.unity3d.com/Manual/MultiSceneEditing.html
search for 'scene manager' in ecosystem Missing from ecosystem: get here: https://github.com/dudebxl/PlayMakerCustomActions_U5/tree/master/Assets/PlayMaker%20Custom%20Actions/Level
Actions:
ArrayListGetRootGameObjects
ArrayGetRootGameObjects
CreateScene
UnloadSceneNum
SetActiveScene
SceneIsLoadedNum
GetActiveSceneName
MergeScene
UnloadScene
SetActiveSceneNum
MergeScenePath
MergeSceneNum
SetActiveSceneByPath
MoveGameObjectToSceneNum
MoveGameObjectToScene
GetActiveSceneAt
SceneRootTransformCount
SceneIsValid
GetBuildSceneIndex
SceneCount
SceneIsLoaded
SceneTest
SceneIsDirty
GetScenePath
Not fully tested so any problems, pm here.
-
Hi, and thanks for these.
I installed SceneIsValid from the Ecosystem, but while building the script, Unity throws this error: "Assets/PlayMaker Custom Actions/Level/SceneIsValid.cs(35,25): error CS0246: The type or namespace name `Scene' could not be found. Are you missing a using directive or an assembly reference?""
What to do? I'm running Unty 5.3.2f1 and Playmaker 1.8.0.f43.
-
Hi,
What do you mean by build? build meaning building game or build meaning compiling the scripts in the editor (if this one, then i don't know cause i just downloaded from eco and i do not get any errors)?
-
*** update bump for 'SceneIsLoaded...' - corrected a everyframe bug
-
What do you mean by build? build meaning building game or build meaning compiling the scripts in the editor (if this one, then i don't know cause i just downloaded from eco and i do not get any errors)?
Ah, sorry. I meant compiling scripts in the editor, i.e. as soon as I install the action from Ecosystem, it displays that error.
-
mmm i don't know. i re-downloaded from ecosystem and i have no errors (millions of warnings lol but no errors). I made the actions using Unity 5.3.4
Maybe if you can, try the action in unity 5.3.4 and see if you have any errors.
Let me know..
-
That was a good idea - I updated to 5.3.4 and the error went away!
But, now I have a new one: I was intending to use Is Scene Valid to check if a scene exists in the project or not, but it doesn't seem to work like that. Even if I write the correct scene name, and check that it's in Build Settings written exactly like that, the isValid result is always "false".
To debug, I temporarily changed target = SceneManager.GetSceneByName(sceneName.Value); to target = SceneManager.GetActiveScene(); and then everything worked as expected, so I think the GetSceneByName is the culprit here.
Did you happen to test this yourself? Should it be possible to check if a scene exists, or is it intended for something else?
EDIT: By mad googling I found out that the IsValid() only applies to loaded scenes, i.e. a scene needs to be loaded to be valid.
-
Ok cool.... So everything is good then?
-
Yep, everything working as expected with 5.3.4. :)
-
I can't find "scene manager" on Ecosystem:
(http://i.imgur.com/ZvlaH3h.png)
Where is it?
-
Hi,
I suspect they are gone because they haven't been moved from Snipt to Github ( different hosting for the Ecosystem, and snipt got shut down in december).
However, full SceneManager support is coming with 1.8.4 version. So keep an eye on the release, they'll be featured as default actions.
Bye,
Jean