Unity Playground Official Thread

Unity is proud and excited to release the very first project aimed at absolute beginners, teachers, educators and game designers wanting a more simplistic introduction to Unity.

With custom inspectors, single-action components and a heap of great 2D assets you can get started straight away. You’ll find step by step documentation guidance included both in the project and online here on the Learn site.

Download Unity Playground free here!

Use this thread to ask questions and get help with playing, designing and understanding making games here.

What is Unity Playground?

A project designed in such a way so that Unity is presented in a more streamlined and effective manner. This 2D, physics based set up will help you understand the basic concept of game design and development as well as provide six example games for you to learn from, play and teach.

Who is it for?

We’re trying to provide Unity beginners and teachers a little more agency in the Editor hopefully allowing you to get more familiar with how Unity works. This brilliant project provides you with the tools you need to understand concepts, key terms and layouts while instilling the joy of game design in a fun and responsive way.

Where can I start?

Here!

Download the project from the Asset Store and open up the Getting Started guide Unity’s Learn site. Follow the steps to start your game development journey! There is more in depth documentation in the Reference Guide, also on the learn site.

Great first start here, and something that had been a personal goal of mine to do. Unfortunately I’m not versed enough with custom editor design to execute on what I have in mind.

I’d count myself as a refugee from Microsoft’s aborted Project Spark game, which I still hold as the gold standard for Block/Tile based programming tools. Its Kode tile based language was linear execution from a Brain code container. Each Brain had Page(s) of (function) Tiles that were executed in order. The closets analogous structure in Unity that I can think of is that each Brain is equivalent to a single Component. Instead of building the whole program sequence out of Components as you’ve done, a single Brain would contain all the Kode tiles.

Pages could be defined within Brains as a way of creating custom functions, built out of function Tiles. One of the most common types of Page setups was Input Mapping for both PC (Keyboard and Mouse) and Xbox (Controller). You’d define and map out all your Player actions (attack, block, jump, roll, etc) and bind them to Controller inputs, then duplicate the Page and make the binds for KB&M. From the Main (1st) page of the Brain, you’d then have a section of

If Controller in Use -> Call Controller Binds Page
If KB&M in Use -> Call KB&M Binds Page

Like Components, a game object could have multiple Brains assigned to it. Both during editing, and dynamically during run-time. Things like Damage Over Time effects could be designed as a Template (Prefab) Brain, and assigned as needed. The DoT Brain would be responsible for Fire VFX, the Damage tick, and eventually its removal from the Game Object.

Now all of the actual C# code behind the scenes was very complex to make it all just work, but to end users it was about as simple and intuitive as MITs Scratch. That simpleness wasn’t a limiter either. Because of the Brains structure it was possible for Kode to grow and match the complexity that a user wanted to put it to. Up to making Arrays and Ordered Lists, which were not Variable options in Kode. Kode also allowed access to some rather deep parts of the Project Spark environment, access to physics aspects, ray casting, adjustments of the voxel terrain, and so forth. Oh, and it was a 3D focused environment, not 2D.

Hi!
What could be wrong?
At first everything was fine, and I even created a simple game scene, but at some point the whole special interface disappeared and could not be called again using the menu or even after a complete reinstallation into a completely new project…

P.S. Sorry for Googletranslate

This is amazing from a teachers perspective, I am just learning now and will deliver this to my students in the coming weeks. One question, the text in the text script says “you win!” but when i alter that text it does not change the text in game mode, for example when i collect all the stars with the space ship. Actually i think yheyext says player 1 wins. I can alter the font and colour but why does the text not change? thanks for any help

You are the one who asked this question on Twitter too, right? In any case, I’ll post my reply here too for others to read:

In the script UIScript.cs, on line 112, you can just change that line to change the text. Right now it’s:
winLabel.text = "Player " + ++playerNumber + " wins!"; but if you change it to: winLabel.text = "You win!"; then it doesn’t display the player number anymore.

EvOne, I don’t know exactly what’s happening but I can see you’re turning the Playground on/off from the top menu. If you don’t see the custom Inspectors, try to go to Edit > Project Settings > Player Settings, then in the Other Settings block, go to Scripting Define Symbols*. If that line is empty, paste this:
GAMEOBJECT_HEADER;DEFAULT_INSPECTORS;CUSTOM_INSPECTORS

Once you press enter, the project should recompile and you should be able to see the Inspectors again.
For reference, the procedure I described is nothing more than what happens (or should happen) when you click on Turn Playground On.

1 Like

This is all very interesting and thanks for the input. For the Playground I wanted to stay as close as possible to the current Unity paradigm, it’s one of my priorities. This makes it easier to just get rid of it, and learn “vanilla Unity”. In fact, the Playground IS vanilla Unity, it just has a few scripts pre-made for you but there are really no custom tools (like visual scripting or blocks) that hide the GameObjects/Components paradigm that everyone - including AAA studios - is using.

I only get this error for a WebGL build, as soon as I switch to PC Standalone, - the On | Off switch starts working.

Your way, with manual filling of “Scripting Define Symbols” - helps to turn on CustomInspector for WebGL, but then you can’t turn off the Playground from menu… :slight_smile:

https://www.youtube.com/watch?v=9Iz7Zzt7Vlw

P.S. This is simplest game prototype, created using Playground :slight_smile:
https://simmer.io/@Alex2D/~225ef94b-6919-ccf6-9c61-031204c38e41
-With added switching between different input modes: Mouse/touch input, waypoynts and original WASD, teleports and spawn of targeting enemies :slight_smile:
(firebutton = )

My students are building animations in the editor and linking them to the animator but looking to attach an animation to the spacecraft, what would they write into the movement script? thanks for any help

2 Likes

Tried it, it’s very cool!

Connecting animation (as in the Animator / Animation Clips) is currently not supported in the Playground for now. However, I might be looking into adding it. What kind of animation are you thinking of? A flipbook animation?
A walking cycle that starts when you move and stops when you stop?

2 Likes

I was thinking just to start the rockets fireing when you move your spaceship. We can create the animation with the animator but a drag and drop script to play that animation ( or any animation) when the wsad keys are clicked would be awesome!

1 Like

Hi, I’m having a couple of issues with the Playground:

#1: I’m having an issue with the Object Creator Area script. I’m trying to make multiple enemies spawn from one spawner. I have one object spawning at 1 second, another at 10 seconds, and one at 20 seconds. However, when the game first starts all of the objects spawn at once and then it kicks my settings in, with the second and third objects showing up again at 10 and 20 seconds respectively.

The best solution I found to this was, depending on how your game plays, was to create individual spawners for each enemy and space them out with the x-coordinate position at different intervals to stop them from all popping up at once. The downside to this is it is a little more resource heavy because depending on the game you’re making and how many enemy types you have you couldn’t potentially have dozens of enemies coming at you off screen. But if you’re making strictly 2D games with modern technology this shouldn’t be too big of an issue.

Here’s a simple table to help with your delayed enemies:

X=2.5 is roughly 1 second of gameplay
x=25 is 10 seconds
x=50 is 20
x=75 is 30
x=150 is 60
x=225 is 90

#2 Is there a way to make it so my enemies don’t keep crashing into each other using strictly playground? Right now I have different enemies coming at my player and will collide with each, causing them to fly off in different directions and then unnecessarily hitting the player, making it feel cheap when the player loses. I also have some artwork that I would like the player of the game to see but it keeps getting knocked out of the camera view by other objects.

Any help would be greatly appreciated. Thank you.

No responses to questions here in a month and a half. Too bad this playground project could really move forward with just a little support for questions in this forum :frowning:

2 Likes

Hi, I have a question , my game’s idea is let the enmeies chasing the player, but the enemies are crashing down to each other , and do not following the player( I use the flowing the target script), ? I think this is a common idea, but the enmenies crash down to each other , please tell me how to solve the problem\

I just found out about this. As I was reading through the documentation I did not see any Drag&Drop scripts. I think it would be a great addition to add those into play ground.

is playground template work for mobile touch input? or will be in next update? thanks

Sorry for the late replies, everyone.

Yes, the Object Creator Area script doesn’t support delay. However, you can quickly change this by using a combination of Condition Repeat (which has both delay and repetition) and connect a Create Object Action.

Otherwise, if you know are a teacher and know scripting, you can quickly add a delay to the Object Creator Area and distribute this custom version to your students.

This is functionality included in normal Unity. First, assign your class of enemies to a different Layer. Then, go to Edit > Preferences > 2D Physics, and make sure the Enemy layer doesn’t collide with itself in the Layer Collision Matrix:

4653298--437170--Screenshot 2019-06-16 at 18.11.42.png

See my reply above.

What do you mean by “drag and drop” scripts? Playground doesn’t support clicks/mouse.

No, touch input would require a whole set of new scripts. For now, I prefer to keep it simple and just focus on keyboard input. As with mouse, all of these alternate input methods would require a complete rework of many scripts, something I can’t manage at this time.

My students are loving this, one thing they are requesting a lot is the movement script linked to an animation. For example when the rocket moves they could play a thrust animation. Currently we have the thrust as just particles. We do create animations but have no way to activate them. thnx for any help!

1 Like

Today our company hosted a kids to work event day. Since we’re a technology firm, we have various workshops in the STEM area. This year, a coworker and I put together a Unity+Playground platformer game that was well received by the students and parents. Our expectations didn’t quite fit in 90 minutes, but I think two 60 minute sessions could easily complete everything we had planned. We were pleased with how the Playground scripts could be used with a 2D platformer game (although we did make customizations when needed).

For anyone interested, our project and slide/class URL are available in our project’s github site: GitHub - kippesp/unity_2d_mar_e_o: Unity Playground Tutorial using a popular vintage theme

1 Like

Hi - I am not able to turn on Playground mode and looked at the project settings that you indicated above. I see that the project settings are correct. Is there something else I am going incorrectly? I am running Unity 2019.2.2f1.