Idea

me@mikevanriel.com avatar image
me@mikevanriel.com suggested

Edit CloudScript in Unity

It would be awesome if it were possible to edit your CloudScripts in the Unity editor and manage their deployment from an inspector. If CloudScripts were also part of the Assets folder then it can even be version controlled using Unity Collaborate or another VCS.

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Comment

·
Joshua Strunk avatar image
Joshua Strunk commented

Could you clarify what you mean but "edit in the Unity editor". Cloud Script is after all JavaScript and can/should be edited in any good Text Editor. (Sublime, Atom, Notepad++, VS?)

Store Cloud Scripts under /Assets

You might already be able to store Cloud Script files under /Assets. First you need to ensure they are under a folder/dir that starts its name with . (dot). This lets Unity ignore it from builds. I would also put that folder under Editor for good measure. This tells Unity it is only needed in Editor, might not be needed with the (dot) folder name. You will probably have to configure whatever VCS you use to get the hidden folder.

Push Cloud Script from inspector

You can already set this up by using the Admin API (I would get second opinion from PlayFab source but as long as you only set/use Secret Key in script under an Editor folder you should be good). The functions your are looking for

GetCloudScriptRevision

GetCloudScriptVersions

SetPublishedRevision

UpdateCloudScript

So to set this all up your dir structure could end up looking like

Assets

--Editor

----CloudScript

------.Source

---------YourCloudScript.js

------UnityCloudScriptTools

--------YourInspectorEditorScript.cs

I would get a second opinion on all of this to make sure it would work out how I expect. (I don't use Unity for managing Cloud Script files)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.