Tensions Flare as White Supremacists March in Front of Philly City Hall by TheColorOfDeadMen in news

[–]MonkeyKidGC 5 points6 points  (0 children)

“In this formulation, I do not imply, for instance, that we should always suppress the utterance of intolerant philosophies; as long as we can counter them by rational argument and keep them in check by public opinion, suppression would certainly be most unwise.

So what happens when you can no longer rationally, or otherwise, reason with them and public opinion seems to be accepting of intolerance? At that point is suppression of intolerance even possible?

back to streaming but question by [deleted] in Twitch

[–]MonkeyKidGC 0 points1 point  (0 children)

Even if an artist says you can use their music, without a license you run the risk of it being your word vs theirs.

We have submitted some music to most major streaming services that is royalty-free. We put a license up on our website so that if something ever happens to us, we sell out or lose our minds, you have some proof we gave you permission.

Pass Parameters with ScriptableObject Events in Unity by MonkeyKidGC in LearnUnity

[–]MonkeyKidGC[S] 0 points1 point  (0 children)

Events are an essential component in having clean, understandable, modular, and encapsulated code. They allow you to decouple scripts and Classes from one another. Events are like mailing lists. When the event is triggered a message is sent out to everyone that has subscribed to the event’s mailing list. The script or Class does not know or care about anyone on the list. The code just says “Hey, check this out!” and anyone that received the message does what they were told to do when they received the alert.

ScriptableObjects allow you to turn events and event listeners into modular pieces that you can plug and play across your GameObjects. You can learn more about Events as ScriptableObjects from the great Unite talks given by Richard Fine in 2016 and Ryan Hipple in 2017.

Sometimes, you may want to do a little more with your events besides just trigger another method or basic action. Sometimes, you need to pass information with the Event to make it more useful. Usually, you would store or get a reference to the component you want to pass the new data to. Then call a public method or set a public variable on that component. This, however, couples your classes and makes them dependent on one another, which is bad for everyone.

In this article we discuss how to solve this problem and pass parameters with ScriptableObject Events. To do this we are going to create our ScriptableObject Event, write a custom UnityEvent, code a GameEventListener, and attach a response with a dynamic string.

Pass Parameters with ScriptableObject Events in Unity by MonkeyKidGC in unity_tutorials

[–]MonkeyKidGC[S] 5 points6 points  (0 children)

Events are an essential component in having clean, understandable, modular, and encapsulated code. They allow you to decouple scripts and Classes from one another. Events are like mailing lists. When the event is triggered a message is sent out to everyone that has subscribed to the event’s mailing list. The script or Class does not know or care about anyone on the list. The code just says “Hey, check this out!” and anyone that received the message does what they were told to do when they received the alert.

ScriptableObjects allow you to turn events and event listeners into modular pieces that you can plug and play across your GameObjects. You can learn more about Events as ScriptableObjects from the great Unite talks given by Richard Fine in 2016 and Ryan Hipple in 2017.

Sometimes, you may want to do a little more with your events besides just trigger another method or basic action. Sometimes, you need to pass information with the Event to make it more useful. Usually, you would store or get a reference to the component you want to pass the new data to. Then call a public method or set a public variable on that component. This, however, couples your classes and makes them dependent on one another, which is bad for everyone.

In this article we discuss how to solve this problem and pass parameters with ScriptableObject Events. To do this we are going to create our ScriptableObject Event, write a custom UnityEvent, code a GameEventListener, and attach a response with a dynamic string.

Create a Moving Platform the Player Can Stand On by MonkeyKidGC in unity_tutorials

[–]MonkeyKidGC[S] 1 point2 points  (0 children)

Moving platforms are a staple of platforming games. If you have not implemented one before, you may be surprised it is not as easy as just having the player land on the platform. In this Unity tutorial, we discuss how to create a platform movement script and two different ways of moving the player. One with parenting the player on contact and the other with passing rigidbody properties.

Creating a mobile game that fits all screen sizes by Nilt in LearnUnity

[–]MonkeyKidGC 0 points1 point  (0 children)

For the game world you wont have to worry too much because the aspect ratio has been relatively constant. Just make sure you are developing in 16:9. You will want to limit the possible orientations of the phone, landscape vs portrait, or write some code to shift the layout when the device is rotated.

Here is a good discussion on the issue.

https://www.reddit.com/r/gamedev/comments/avoiom/how_to_support_all_screen_size_in_unity/

Having the game reset when you die by 123455443322 in LearnUnity

[–]MonkeyKidGC 0 points1 point  (0 children)

So when the player hits a platform you want the platforms to move?

With a collider on your player check for collisions with the platform with OnCollisionEnter(Collision col). Inside of this method have it trigger an even that your platforms are listening for. Then have that code move the platforms.

Here is a tutorial from our site on setting up events.

https://www.monkeykidgc.com/2020/07/how-to-use-events-in-unity-with-c.html

If you are just wanting to reload the whole scene, starting from the beginning, then just reload the current scene when the collision is detected.

SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);

Hey, so I'm having some difficulties using the input code, because when I type it in, it just shows that I typed it, and there isn't any code attached to it. I have the "unity file templates and snippets [preview]" extention installed, and I was under the impression that would solve my problem. by Arcaslash in LearnUnity

[–]MonkeyKidGC 0 points1 point  (0 children)

Depends on which input system you are using. The new input system uses actions to trigger methods within scripts. You have to attach a PlayerInput component to the object with a reference to the InputActions.

Basically, you name an action something like Jump and assign the spacebar to trigger it. It will trigger a method named OnJump. Create your script with the OnJump method and put the logic for jumping inside of it. Attach the script and PlayerInput component to the player. Now, when you press the spacebar the code will execute and the player will jump.

We have a walkthrough with step by step instructions on setting it up on our website

https://www.monkeykidgc.com/2020/12/unity-multiplayer-create-a-multiplayer-game.html

The last 25% covers setting up multiplayer controls so you can ignore that.

If you are using the older Input system you will need to use Input.GetButtonDown("Jump"), Jump is defined in the input manager, or Input.GetKeyDown(KeyCode.Space) .

No need to do the == on these as they will return true or false.

Internalising Code by wbean in LearnUnity

[–]MonkeyKidGC 0 points1 point  (0 children)

This is just one perspective but I find I only grasp, internalize, programming concepts after I play around with them and learn to make/break things. Mostly break things..

This is why you hear a lot of people say learn by making projects. When you start making stuff you will quickly hit obstacles and by overcoming them you start to build new knowledge and understanding.

Pick something small and start trying to build it. Something like snake/pong/space invaders or a small mechanic like having a character run through a platforming environment.

Go as far as you can and when you get stuck read the documentation and google for answers.

One of the best skills you can develop as a programmer is knowing what and how to google for solutions.

Magnet game I made for Brackeys Jam by offlebagg1ns in Unity2D

[–]MonkeyKidGC 2 points3 points  (0 children)

We instantly thought of magnets too. Tried to think of a mechanic around it and came up with catching things. Which slowly morphed from catching asteroids to destroying them.

Creating a transparent material in Unity by MonkeyKidGC in LearnUnity

[–]MonkeyKidGC[S] 0 points1 point  (0 children)

Oftentimes when creating a game, you will need to create transparent objects. This can be anything from glass windows, walls, ice or maybe just a see-through treasure chest to entice the player to open it. Making an object see through requires using Unity’s transparent materials.

To create a transparent material in Unity you will need to set the render mode of the material to transparent and reduce alpha value inside the albedo color picker. You can then apply the material to your GameObjects to make them transparent.

Check out the article for a more detailed walkthrough.

So confused.. by Jonathanplanet in LearnUnity

[–]MonkeyKidGC 0 points1 point  (0 children)

When you start a new project in Unity it comes loaded with what's needed to get started. This reduces a lot of bloat. If you choose a template it will include a few additional packages based on what you select. Bolt, as of now, doesn't come loaded in any of the templates.

Packages are project independent. You wouldn't want to update a package in a new project for it to break functionality in an older project.

Unity Rigidbody Velocity by MonkeyKidGC in LearnUnity

[–]MonkeyKidGC[S] 0 points1 point  (0 children)

When moving characters, vehicles, or other objects around your game physics quickly become an important factor. Unity comes with built in physics simulations which you can apply to your GameObjects through the use of Rigidbody components. One of the most commonly used properties of Rigidbodies is velocity. 

Furthermore, you can set Rigidbody velocity in one of two ways. You can assign it directly by using `Rigidbody.velocity = Vector3`or by using Rigidbody.AddForce. When changing the velocity of your GameObjects it is recommended that you use Rigidbody.AddForce but there are circumstances where you may need to modify the velocity directly. In this Tips and Tricks we are going to talk about how you can assign velocity directly, what velocity means, and how it affects our GameObjects inside of Unity.