Questions tagged [unity3d]
Unity, also referred to as Unity3D, is a cross-platform game engine with a built-in IDE developed by Unity Technologies. It is a commercial development platform for creating games, interactive 3D applications, training simulations, and medical and architectural visualizations.
31 questions with no upvoted or accepted answers
7
votes
0
answers
757
views
Unity3D shader for rendering 2D sprites with a pseudo-glitch effect
I'm making a puzzle game in Unity with sprite-based graphics. When the game is paused, I want to hide most game elements, because I don't want the player to be able to pause and leisurely think about ...
5
votes
0
answers
701
views
Multithreaded pathfinding in Unity C#
I've tried to implement multithreaded pathfinding in an attempt to increase performance, but if anything, performance seems to actually decrease when I enable multithreading.
Is there anything I ...
5
votes
0
answers
157
views
Prototype GameManager for game written in Unity
I am self taught, so I'm consistently seeking ways to code better, and more efficiently. If anyone has the time, please advise me on what can be done better with explanations as to why the old method ...
3
votes
0
answers
862
views
C# Procedural Mesh Generation Optimization
I'm making a terrain-deformation system in Unity that utilizes the common marching-cubes algorithm. So far I've gotten the system working, employed Unity's job system and burst compiler, and managed ...
3
votes
0
answers
51
views
Accurate && precise location data within a timeframe (session)?
Scenario
A session would start & end within a time frame. Within this time frame, the device would be moving within a constraint environment. The movement would be extremely slow (slow-walking to ...
3
votes
0
answers
52
views
Manage independent script component architecture in unity
I have different set of objects where I have to show Name UI and Menu UI using OnMouseDown and on OnMouseEnter Events. Remember ...
3
votes
0
answers
69
views
Procedural Generation
I'm currently working on a procedural generated terrain.
I've written the Chunk script, and it works great. When I generate a few chunks in Unity, it runs alright, but it could definitely run better!...
3
votes
0
answers
3k
views
Unity3D Property Drawer for a MinMaxSlider
This is a bit of an interesting one. Read about custom Property Drawers in the Unity Docs. Read about MinMaxSlider in the Unity Docs.
Unity's ...
3
votes
0
answers
202
views
Mesh Modifier System in the Unity Game Engine using C#
The system is meant to replicate the deformers and modifiers commonly used in 3D modeling programs like 3DS Max, Maya, Blender and Cinema 4D. I made a post on Reddit, explaining the features and ...
3
votes
0
answers
272
views
Splines on Unity3D
I've written this small code chunk to implement a very basic spline system for object motions. As I've only used C# on Unity3D so far I would appreciate feedbacks on this, especially on access levels, ...
3
votes
0
answers
437
views
Reading log file of subprocess
I run subprocesses with lot of output (compilation of Unity 3D projects).
I use log parsers to find known issues.
...
2
votes
0
answers
163
views
Timer built in Unity using Async Await
For learning purposes, I built a timer that does something every x seconds in Unity using an async Task instead of a coroutine.
I'd like to know if there is a less awkward way of writing this:
What ...
2
votes
0
answers
109
views
raycast interaction system
I've written a solution to make creating new interactions easier but wanted feedback to see if there is a more effective way of going about this.
I've written a script called interactable which is ...
2
votes
0
answers
28
views
Unity player controller code
I wrote this code I am making for an open source game. I just would like some feedback to know if my code is good. One thing I have to question is my use of private functions okay? I use a lot of them ...
2
votes
0
answers
310
views
How should I go about implementing rust into the unity3d engine?
Recently, I've explored using rust as a scripting language for unity.
My current method involves creating a DLL from rust, and loading it into my game at runtime. It requires that the user use a ...
2
votes
0
answers
435
views
Is this a good pattern design for a Unity dispatcher for creating thread safe methods?
Well, my intention here is to allow users to execute Unity methods/properties in other threads by using this Dispatcher implementation:
...
2
votes
0
answers
193
views
Unity rotator script
I was playing around with Unity's new Entity Component System and I was trying to implement a rotator system.
This is what I came up with:
Component Data:
...
2
votes
0
answers
129
views
Access a variable after several references
I have a team lead that used to write references in a single script then access it in every script. Like for accessing a variable he has to write code in this way ...
2
votes
0
answers
2k
views
Making a Icosphere in C# and Unity
In Main.cs, which is attached to a GameObject that has a MeshRenderer and MeshFilter:
...
2
votes
0
answers
67
views
Generic DialogueBox class with different parameters
I have implemented a DialogueBox class which can be static, singleton, service locator, etc.
I have written it as a singleton pattern and implemented it in Unity3d engine. It is a part of a game.
I ...
2
votes
0
answers
342
views
Unity Generic Pool System
So i'm using this for pooling my gameObjects in game. Every other script can ask for a pooled GameObject using ...
2
votes
0
answers
61
views
Task based GameObject recorder for networked game
I've recently been dipping my toes in to async code so I'm not 100% sure if there's a better way to do this, or if I'm going to run into problems down the road.
I plan on using the following class in ...
2
votes
0
answers
51
views
Getting right model from list
Im not a programmer, but somehow like trying to make something, almost like a hobby.
As of now i have made a list of different gameobjects (models) and i need to choose right one from that list. ...
2
votes
0
answers
38
views
Unit sprint mesh rendering
I have built this code in the past and I am reviewing it once again. I have a feeling that I could make the code much faster. Could someone please look at the code.
What happens is that every time ...
2
votes
0
answers
128
views
Z sorting implementation for a 2D isometric game
This is a naive implementation of a Z-sorting in order to fake 3D depth using sprites in a 2D scene. I would appreciate feedback on this, especially for performance as this has to be called each frame ...
2
votes
0
answers
8k
views
Blocking TCP Client with Threads vs. Non-Blocking TCP Client with Unitys Update
I'm not sure if this is the right subsite of stackexchange because it's not only about code review but a bit about design eihter.
I'm currently developing a network application.
I need to connect a (...
2
votes
0
answers
656
views
Unity post/get/check www requests with success callback and error callbacks
This is a class I built to handle post/get requests to URL's, but also check for connection and provide different callbacks depending on success or failure. It is intended to work without being ...
1
vote
0
answers
777
views
Unity Tilemap RandomBrush with orientation and probabilities and fixes
Unity3D.com recently released a 2-D Tilemap system.
It comes with a really basic RandomBrush for painting a random tile from a list of tiles.
But the tiles were not being saved between preview and ...
0
votes
0
answers
45
views
Unity 2D Platformer that saves your past positions and replays them as a "Ghost"
I have been trying to get better at C# and Unity. As my first programming language and game engine, there are still a lot of things I do not yet understand. I know the basics of both, but I don't know ...
0
votes
0
answers
48
views
Unity Gesture Recognition Code in C#
I'm new to C# programming and have been working on a Unity project that incorporates gesture recognition using the PDollarGestureRecognizer library and Unity XR Hands package. My application is ...
0
votes
0
answers
691
views
Creating a generic base class for singletons in Unity
Singletons can be very tricky to work with in Unity, especially when you dont want to give up on Monobehaviour features.
Most examples I've seen make use of ...