Search


Enter Unity:

You have some programming experience, and the inspector's drag-and-drop features just make development so fast.

You make a couple of games this way, but notice some organization problems in your last one.

You'd rather just finish and release though.

3 years later, you're developing a full-scale video game.

3 months into development, you notice a stringy mess of drag-and-drop references!

"There has to be a better way than dragging these asset references to EVERY GameObject and Prefab!"

Well there is, and it's called TypeSafe.


What Does It Do?

TypeSafe is a Unity Asset that allows you to generate references to your Resources as constants in your code.

That means to reference Layers, Tags, Prefabs, and some others, you won't have to drag anything or create constants by hand.

Pretty awesome. Here's an example:

var playerLayer = SRLayers.Player

Okay, so we have a reference to the layer assigned to Player objects. Now, I don't have to record it as a constant string anywhere because TypeSafe already did that automatically.

Let's say for example we wanted our player not to be able to shoot themselves. We could do something like this:

Physics.IgnoreLayerCollision(SRLayers.Player, SRLayers.PlayerProjectile)

Wonderful.

"Okay, so I don't have to type layer names in my scripts. Big whoop, I'd rather keep my 10 bucks."

...but wait, there's more!

So TypeSafe also stores references to everything in the Resources folder. What's more is that each folder is a class, which allows for great code readability.

For example, let's say I have 3 different enemies I want to reference. They're in my Resources/Prefabs/Enemies/ folder. Here we go:

enemy1 = SRResources.Prefabs.Enemies.Gunship

enemy2 = SRResources.Prefabs.Enemies.Interceptor

enemy3 = SRResources.Prefabs.Enemies.Frigate

Naturally they're spaceships because this is an Omnirift post.

Anyway, I have references to my enemies prefabs and I can now spawn them in the game or do anything else I'd like with them.

But what if you wanted to spawn all of them in a loop? Check it out:

foreach (GameObject enemy in SRResources.Prefabs.Enemies.GetContents<GameObject>()) {

// do something with enemy

}

Oh look, I didn't have to drag my 3 enemy prefabs into a Singleton Unity GameObject's collection with the inspector and iterate over it. This is why TypeSafe is really great.

Performance

I'll be honest, this asset gives some addition to the infamous 'Unity Refresh' when refocusing Unity in your OS after file/code changes.

That's why in TypeSafe's settings menu, you can choose either automatic rebuilds or manual builds.


I get it though, "why would I want to stop using one of Unity's biggest features?"

You wouldn't.

You see, what TypeSafe does is provide you with great organizational power, but as the cliche goes, with great power comes great responsibility.

When using constants for many different features, you want to keep reusability in mind.

For example, if I wanted my spaceships to spawn variable gun projectiles, rather than making 3 different spaceship scripts just to reference different constants, I could use the inspector to drag and drop a different projectile reference to the projectile attribute.

So make sure you only use TypeSafe constants when you know you won't need a variable attribute.

Should I Get It?

TypeSafe does not really have a lot of negatives. The only real problem with it is that it can be slow with a large project.

The good thing is that there is a solution: use manual constant generation instead of automatic.

Personally I use automatic constant generation, but I use a very strong computer because of Unity and Unity Plugin overhead.

TypeSafe also doesn't cost much at all; it's a very good deal at $10.00, or $8.00 if you have a Plus or Pro subscription.

Yes, you should get it, and you can do that here:


Okay, now that we're done talking about buying TypeSafe, use it and let me know what you think! (Or just send me hate comments, whatever makes you feel better.)

Have an awesome day,

Bilal

#gamedev #unity #review #assetstore #unityassetstore #unity3d

69 views0 comments


Hey Game Developers,

Bilal here, and I just wanted to share all of the Unity® assets that I find absolutely essential based on the type of games you’re creating. I’ve personally used all of these assets in my projects, and I highly recommend them as premium products from publishers who clearly put effort into creating tools to help you make games faster and better.

If you’re a solo developer, these assets are MUST-HAVES because it’s very difficult to wear every hat in game development. You have to draw the line of doing everything somewhere, and these assets are a perfect place to start!

1. Universal Sound FX - Audio

I recommend every Unity® developer purchase this package unless they already have a designated audio engineer creating all of their sounds, as the package includes many premium sounds through many different categories.

Every video game needs sound effects, and they should be consistent with the game’s style and quality. That’s why I always recommend Imphenzia’s Universal Sound FX package, which comes with exactly what it sounds like: sound effects that you can use “universally,” or in any games you create.

All the games I’ve worked on have used this package in some way, whether it’s a laser noise, game over sound, music effect, an explosion, or many other options. So if you’re looking to make an FPS, RTS, MOBA, Platformer, Top-Down Shooter, or anything else at all, this package will have a lot of high quality sound effects you’ll want to use.

If you’re convinced, you can get it right here:


2. ProBuilder Advanced – 3D Level Editor

If you’re creating a 3D game, I highly recommend ProBuilder advanced to quickly prototype, and later release high quality, easy to create levels.

ProBuilder is an exemplary level creation tool that fits directly into the Unity® Editor. Just like you would be able to in a 3D modeling tool, like Blender, ProBuilder allows you to extrude, scale, and otherwise transform basic geometry in Unity® to shape your level however you want to.

You can also use ProBuilder to create any shapes directly in the Editor so that you don’t have to worry about importing from an external application. This really speeds up your workflow, so you can quickly create game props, and depending on your art style and game type, items, weapons, buildings, or even characters.

If you want to maximize your level creation efficiency, check out ProBuilder here:


3. SPACE for Unity – 3D Space Scene Construction Kit

To create a beautiful and immersive 3D space experience in your game, I recommend picking up SPACE for Unity! This package is a combination of a level editor, colorful space art including nebulas, asteroids, and planets.

In SPACE for Unity, not only do you have free access to use a library of space goodies in your scene, but you also have the option to generate a universe automatically, which will configure immersive asteroid belts, distant nebula visuals, and even allow you to test the scene with an in-the-box spaceship with maneuvering and firing controls.

To add beautiful space visuals to your space game, check out SPACE for Unity here:


All right, these are my favorite Unity® assets on the Asset Store right now as out of all the Unity® assets I’ve used, these have given my games the most noticeable quality and efficiency for creating Unity® games.

I’ll see you in the next post,

Bilal

#unity #coding #programming #c #net #unity3d #visualstudio #gamedev

108 views0 comments
1
2

game development