Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes

How to send an interface message?

Method 1 - Unity UI Event System Thanks to Byte56 for pointing out that there's a new approach to messaging in Unity, which is much more similar to what the asker describes in Unreal. One quick ...
DMGregory's user avatar
  • 135k
2 votes

What is the purpose of a "press start" screen?

I recently added a start screen to my mobile game. The decision came after testing it on an older phone. The game front loads a majority of the assets into memory when the game starts, and was causing ...
user113550's user avatar
2 votes
Accepted

How to distinguish between different platforms using an interface

If your interface implementations differ only in the data they return from these getters, you might not need interfaces at all but a type object. Then your platform script might be just an attachment ...
DMGregory's user avatar
  • 135k
2 votes

Unity: Keyboard Shortcut to Deselect Game Object

Extending from DMGreggory's solution, we could simplify the SelectNone function even more: ...
DrStrange's user avatar
2 votes
Accepted

Unity: Keyboard Shortcut to Deselect Game Object

Reading through the list of Unity editor keyboard shortcuts, it doesn't look like such a shortcut exists. We can save & load selection presets using Ctrl+(Alt/Shift)+(1-9), but you can't ...
DMGregory's user avatar
  • 135k
2 votes

Is it possible/recommended to make a universal game library interface in C

While it is true that SDL already provides support for multiple platforms, it is of course possible to build another layer on top to abstract the specifics of SDL away from the rest of your code. We ...
Jim Offerman's user avatar
2 votes

What does "Continuity of response" mean in the book "Game Feel"

This is a bit of conjecture; I haven't read the book, but did some digging on the author's companion website for the book. There I found links to some posts stating These articles were one of the ...
Pikalek's user avatar
  • 12.4k
2 votes

Interaction between interfaces with C# Unity

Unity is a game engine that's designed around the principle of composition over inheritance. That means the idiomatic way to design this would be something like this: GameObjects that represent items ...
Philipp's user avatar
  • 120k
1 vote
Accepted

Add Item for OptionsButton is Gone from the editor

This option is currently (Godot 4) on the inspector. Open "Items": And there you will find an "Add Element" button: Clicking it will create an empty item that you can then ...
Theraot's user avatar
  • 27k
1 vote

Interaction between interfaces with C# Unity

I'm not a proffesional, so you should take this with a grain of salt. I think you should create a separate MonoBehaviour script which takes the Item class and ...
koogel's user avatar
  • 79
1 vote
Accepted

UnityEditor related classes can not be referenced. Why?

So, as #DMGregory pointed out the classes inside the editor folder can not be referenced by classes outside of the editor folder....
qqqqqqq's user avatar
  • 278
1 vote

Given a base class and many derived classes with additional features, what's the best practice for accessing those features?

There's nothing wrong with keeping a container of derived class observing pointers for direct and immediate access while keeping an overall base class container for management: ...
Casey's user avatar
  • 2,035
1 vote
Accepted

Interact with inheriting class methods from "casted" base class (collisions, etc)

In Unity, I'd generally recommend working with the principle of composition over inheritance. In this case, if player characters, enemies, and environment objects all need to take damage, then damage-...
DMGregory's user avatar
  • 135k
1 vote

Is it possible/recommended to make a universal game library interface in C

What you are suggesting to do here is actually what a library like Allegro or SDL is doing for you. SDL, for example: officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for ...
Philipp's user avatar
  • 120k
1 vote

How do I communicate that something is a tutorial button

There is a common image used for a tutorial. Use it. (But not this one...this one I grabbed off of google at http://wiki.minetest.net/images/thumb/3/3b/Tutorial_logo.png/150px-Tutorial_logo.png)
Evorlor's user avatar
  • 5,793
1 vote

How do I communicate that something is a tutorial button

The most common glyph/icon I've seen for a tutorial is a Question Mark (?), although of course this can also mean a more general 'help' area. Other icons I have seen are a book or a blackboard. To ...
philomory's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible