r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

Traveller DX - New solo dev updates
https://www.youtube.com/watch?v=F0H5UeyduCI

https://redd.it/1btnzb0
@r_Unity3D

Читать полностью…

r/Unity3D

I started working on the character customization menu. Any thoughts?

https://redd.it/1btaemw
@r_Unity3D

Читать полностью…

r/Unity3D

My enemies chase the player, how can I optimize this method?

Hey all,

Super new to making games/Unity. I made a 2D game with 100s of enemies and they all chase the player. For this I use the following method:

void ChasePlayer()
{
if (player != null)
{
Vector2 moveDirection = (player.transform.position - transform.position).normalized;

// Calculate movement without depending on Time.deltaTime
Vector2 movement = moveDirection * enemyStats.moveSpeed;

// Perform a raycast to check for obstacles before moving
RaycastHit2D hit = Physics2D.Raycast(transform.position, moveDirection, enemyStats.moveSpeed * Time.fixedDeltaTime, LayerMask.GetMask("Solid", "Enemy"));

// If there is no obstacle, move the enemy
if (hit.collider == null)
{
// Apply the movement directly without multiplying by Time.deltaTime
GetComponent<Rigidbody2D>().MovePosition((Vector2)transform.position + movement * Time.fixedDeltaTime);
}
}
}


Is there a way to optimize this? Currently I call this method every frame because of the Update() method and it causes big FPS lag.

https://redd.it/1btcwou
@r_Unity3D

Читать полностью…

r/Unity3D

Objects created via addressable become invisible after 0.1 seconds.

Any objects that I created via addressable in Build become invisible after 0.1 seconds.

Any default objects are fine, and all colliders and actions are working fine. It seems like all sprites become invisible when it is fine in the editor.

Does anyone know how to fix this?

https://redd.it/1btf4b6
@r_Unity3D

Читать полностью…

r/Unity3D

guys who now the problem (i use a UK phon and USA phone and also my phone number )
https://redd.it/1btax16
@r_Unity3D

Читать полностью…

r/Unity3D

Finally released my first game - proud of myself! Looking for some feedback :)

Hey fellow Unity devs! After a lot of hard work I got my first game - The Dark Realm - out of Early Access and I'm very proud of it!

The game is a Bullet Hell Roguelite in which you control a cat and traverse procedurally generated realms, with multiple classes, gamemodes, difficulty levels and hundreds of items.

You can see the trailer here.
If it sounds interesting, you can find the game on Steam here \- currently with a 20% launch discount!

Looking for feedback, mostly regarding the trailer, as it was my first time doing any editing.

Feel free to ask any questions you might have, will be more than happy to answer them!

Also, here's a code for whoever has got the fastest fingers: 79VBP-2XVW8-DQFYI

https://redd.it/1bt6vnc
@r_Unity3D

Читать полностью…

r/Unity3D

Made some UI Icons! :) Now available!

https://redd.it/1bt5cd5
@r_Unity3D

Читать полностью…

r/Unity3D

Help with blur function warping around the texture (more images with shaders and the custom function)

https://redd.it/1bt2kvb
@r_Unity3D

Читать полностью…

r/Unity3D

f
https://redd.it/1bt02cn
@r_Unity3D

Читать полностью…

r/Unity3D

GetComponent not working (stuck on this for 3 years..)

&#x200B;

https://preview.redd.it/dm5h7edvmtrc1.png?width=1920&amp;format=png&amp;auto=webp&amp;s=63b275820629de15fdb707813e1ffb4d0ac398c8

https://preview.redd.it/wla67edvmtrc1.png?width=1920&amp;format=png&amp;auto=webp&amp;s=f43362ed2593b3234b953f2fbb6c52ed3a2fe3d6

Here are my scripts. i am trying to make it so that whenever the laser hits the enemy, the enemies health is reduced by the lasers damage. Health does not get reduced and laser does not et destroyed. If i get rid of GetComponent it works fine but i can only set the enemy health to be reduced by only a fixed number. please helppppp im so tired of being stuck on this. Edit: "other" was me testing a comment i got from anbother post. im aware it doesnt work. getting rid of the "other.gameobject" takes away all errors in VS

https://redd.it/1bsxiuj
@r_Unity3D

Читать полностью…

r/Unity3D

I have several problems 🫤

https://redd.it/1bsv98r
@r_Unity3D

Читать полностью…

r/Unity3D

Question about implementing end lag

Hey all. Had a little question about a project I’m working on.

I won’t go too in-depth about it, but I’m making a 2D platformer where my character has a basic attack, and I want to add a delay so it has end lag. I’ve looked around for ways to add delay, and found things like Coroutines and the Invoke function, but I wanted to hear this communities advice about what would be the best way to go about it.

Thanks!

P.S. also curious about how to possibly cancel end lag

https://redd.it/1bss9uz
@r_Unity3D

Читать полностью…

r/Unity3D

Do I need to create a separate left walk and right walk animation in aseprite or can i just make one and in unity flip the character depending on its direction or something?



https://redd.it/1bsqrfv
@r_Unity3D

Читать полностью…

r/Unity3D

Is it profitable to upload a game on Y8?

they are saying " Earn 50% of ad revenue from the page where the game appears" is there any one still using it?

https://redd.it/1bsc03m
@r_Unity3D

Читать полностью…

r/Unity3D

A person told me this game is HORRIBLE and that it has no future. I get that it isn't good, but i don't think its THAT BAD. Am i just too attached to it or is the person wrong?
https://www.youtube.com/watch?v=Z0Kz4AS2t_U

https://redd.it/1bsij0t
@r_Unity3D

Читать полностью…

r/Unity3D

How do I move both the child & parent gameobjects at the same time?

https://redd.it/1btmrls
@r_Unity3D

Читать полностью…

r/Unity3D

UI Score doesn't increase

As the title suggest, I followed GamerDev.tv 2D Unity courses and I am at the last part, where I need to make a space shooter game. Everything works fine, except only one thing: the UI score (the score that you made using TextMeshPro). I have 3 scenes (main menu, main game and game over). If I play the main game scene, the UI works perfectly. But if I switch to main game from main menu or game over, the UI score doesn't increase anymore. Here the video with the problem. https://wetransfer.com/downloads/134279e08bfb3af71e77893ecb851e4620240401234806/e5de3a

https://redd.it/1btk238
@r_Unity3D

Читать полностью…

r/Unity3D

Finally, the game I've been solo working on is releasing on Steam in just 3 days!

https://redd.it/1btcczr
@r_Unity3D

Читать полностью…

r/Unity3D

Are my game graphics getting better?

https://redd.it/1bt9m5g
@r_Unity3D

Читать полностью…

r/Unity3D

Finally got the full half-pipe jump physics working. Next step is adding tons of animations. If you need me, I'll be busy watching hour long skateboarding compilations lol

https://redd.it/1bt6617
@r_Unity3D

Читать полностью…

r/Unity3D

Charged Attack

I've switched all my inputs to the Unity Input System. I was curious about how I would go about taking a basic attack action, just a press of the left mouse button, and turn it into a charged attack by holding down the button and then releasing, thus creating a "charged attack".

I assume I would make another input action for it, but how would I account for the holding (i.e. charging portion)?

https://redd.it/1bt7gnk
@r_Unity3D

Читать полностью…

r/Unity3D

We're adding some tiny painting decorations to our tiny shop game :D
https://redd.it/1bt3o9k
@r_Unity3D

Читать полностью…

r/Unity3D

2D sprite real-time modification



I want to make a game related to sword usage, and want to implement simulated sprite cutting to floor, objects, etc. Tried to know how could i implement any type of simulated 2d sprite modification, but no actual help, the closest i got was 3d mesh cutting, had an idead to combine 2d and 3d to reach what i have in mind, but would love if i found a way for applying 2d cutting in real time, anyone could help with it or have prior knowledge?

https://redd.it/1bt0d4l
@r_Unity3D

Читать полностью…

r/Unity3D

Why Pixel snap does not snap everything?

What im doing wrong? I have cinemachine Pixel camera, I have unity pixel snap. I have 3 parallex layers and it only snap two Bgs instead of the three and also the ground tiles does not snap at all. How I can make all my graphics will snap to pixel?

https://redd.it/1bszgbe
@r_Unity3D

Читать полностью…

r/Unity3D

How does a object with DoNotDestroyOnLoad reference another script after reloading scene?

I have a GameManager handling rounds (fighting game, counting to 3 wins on both sides), and it is utilizing DoNotDestroyOnLoad to keep track between rounds. This references my player script, which, when the player dies, increases the round win count in my GameManager script.

Since my GameManager is technically a different object after reloading the scene (reset game for round 2), it obviously looses reference to the player script.

Is there a way to call back/re-reference either the player or GameManager, or will everything have to be DoNotDestroyOnLoad? OR will it be better to not reload the scene for round 2, and instead rework the way round resets work (move gameobjects to starting position, reset health/time, etc)?

I will update this with code/screenshots when I can.

Thanks so much

https://redd.it/1bswy9y
@r_Unity3D

Читать полностью…

r/Unity3D

My BIG UPDATE .Add Endless mode,collecting Coins to buy something. How far can u go, may be less than 10m :), I need all your opinions(as much as possible). Thanks. link below comment
https://www.youtube.com/watch?v=XyW8qKYdh6A

https://redd.it/1bsuu0y
@r_Unity3D

Читать полностью…

r/Unity3D

Animation Skipping

I have an attack animation that is made of 4 frames. Each frame has an event that moves an object to a specific location. However, sometimes, only 2 frames play, sometimes all of them play, and sometimes, only 3 frames play. It seems to be completely arbitrary so I don't know how to solve the issue.

https://redd.it/1bsssj2
@r_Unity3D

Читать полностью…

r/Unity3D

how to change unity tile size?

i mean not the sprite size the problem is that i have 8x8 tile and i want to for example make a ground with it but the tiles have space between them, even in pallete itself the size isnt a full cell. i know i can increase sprite size but i want to use 8x8 for platforming

https://redd.it/1bsodmx
@r_Unity3D

Читать полностью…

r/Unity3D

Photon for Networking is giving me a huge headache, Is there an easier alternative? please read to help :3

I'm creating a game similar to MapleStory and everything seems to go really great! EXCEPT the networking between players. I followed too many tutorials and guides but the syncing between players is just not always there. The variables are not always syncing and the world is pretty laggy/messy when it's a 2+ players

Also sometimes when I try to enter an "already existing room", I do not see any room (I have to keep re-opening/re-hosting the room until the other player can see it to be able to join).

It sucks cuz I spent so much time learning photon but it's just a big disappointment, unless I'm really doing something wrong.

Has anyone been using Photon and experiencing this?

Do you guys recommend something way simpler to sync between players? (It's a lot a lot of things to sync! Monsters movement + items + objects + variables + etc...)

Sorry for the rant but I'd highly appreciate any help!

And if anyone willing to look at my codes I'm down to share in DMS or even here in this post!

https://redd.it/1bsi8aa
@r_Unity3D

Читать полностью…

r/Unity3D

This was much more difficult than I expected lol, but the basic skateboarding physics are finally working. With more polish, better graphics, actual models, animations, tricks and grinding, something cool looking might come out of this

https://redd.it/1bshx3u
@r_Unity3D

Читать полностью…
Subscribe to a channel