playMaker

Author Topic: (unity5.3.4+) Scene Manager  (Read 9614 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
(unity5.3.4+) Scene Manager
« 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.
« Last Edit: May 17, 2017, 07:17:04 AM by dudebxl »

KoneJone

  • Playmaker Newbie
  • *
  • Posts: 20
    • Planet Jone
Re: (unity5.3+) Scene Manager
« Reply #1 on: May 21, 2016, 05:05:07 AM »
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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: (unity5.3+) Scene Manager
« Reply #2 on: May 21, 2016, 01:59:56 PM »
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)?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: (unity5.3+) Scene Manager
« Reply #3 on: May 21, 2016, 03:22:01 PM »
*** update bump for 'SceneIsLoaded...' - corrected a everyframe bug

KoneJone

  • Playmaker Newbie
  • *
  • Posts: 20
    • Planet Jone
Re: (unity5.3+) Scene Manager
« Reply #4 on: May 22, 2016, 10:40:42 AM »
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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: (unity5.3+) Scene Manager
« Reply #5 on: May 22, 2016, 10:49:20 AM »
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..

KoneJone

  • Playmaker Newbie
  • *
  • Posts: 20
    • Planet Jone
Re: (unity5.3+) Scene Manager
« Reply #6 on: June 02, 2016, 01:01:19 PM »
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.
« Last Edit: June 02, 2016, 02:38:34 PM by KoneJone »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: (unity5.3.4+) Scene Manager
« Reply #7 on: June 03, 2016, 04:26:25 PM »
Ok cool.... So everything is good then?

KoneJone

  • Playmaker Newbie
  • *
  • Posts: 20
    • Planet Jone
Re: (unity5.3.4+) Scene Manager
« Reply #8 on: June 04, 2016, 03:45:45 AM »
Yep, everything working as expected with 5.3.4. :)

hypermitch

  • Playmaker Newbie
  • *
  • Posts: 1
Re: (unity5.3.4+) Scene Manager
« Reply #9 on: January 23, 2017, 07:19:24 AM »
I can't find "scene manager" on Ecosystem:



Where is it?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: (unity5.3.4+) Scene Manager
« Reply #10 on: January 24, 2017, 03:02:02 AM »
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