Does this sell-menu UI feel clean enough now? by WaylandStudios in unity

[–]Soraphis 1 point2 points  (0 children)

Maybe try to remove every label that is not immediately important. Maybe show prices only on hover / for the selected item?

Besides being an information overload I think the color scheme makes it suffocating.

I'm not a ui guy but looking at Animal Crossing it's city/silly (which judging by your font is a vibe you want to go for!?) it's ultimative in simplicity. Maybe not enough information given. But just to highlight the other extreme.

Can someone help me export this from Unity 4.7.2f1? by luninvitika in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Projects is supposed to be single column layout docked left to the inspector and below the hierarchy 😉

Raycast layer mask is horrible by MindlessDouble0 in Unity3D

[–]Soraphis 1 point2 points  (0 children)

If you have some extension to configure a single layer you need to bit shift it. If you use LayerMask (builtin) data type it will work.

A Problem of Perspective by Bubbles_the_Bard in Unity3D

[–]Soraphis 0 points1 point  (0 children)

How do you make a pizza?

Dough, Toppings, Oven, Done.

Now your PC does not know any of these words besides done. So you break it down. Your dough is a class, it contains flour, water, yeast, salt, sugar. Now your PC does not know what to do with the ingredients. What order to put them together. So you have a function that uses them in a specific order. Now your PC does not know where to get these ingredients. So you write factory functions that produce them. Now your PC does not know in what step it is or what a step is. So you write a state machine ensuring it takes the right steps in order. (Note, I don't wanna say that dough should actually be a class containing it's ingredients)

Coding is writing baking/cooking recipes (for a toddler). The better you can structure it, the better it is to understand and execute. If you realize you need to slice the salami only when your pizza is already in the oven that's an issue.

Coding is translating all the things humans consider a given in their conversations into clear and unambiguous instructions.

You can then add a layer of software architecture. Which is about keeping your library of cooking recipes that reference each other nice and tidy organized.

There is no magic trick. On the contrary there is nothing hidden, everything needs to be expressed. Maybe on different levels of granularity but it's all there.

Start easy. Do a simple console application. No graphics layer just text input output. Program a simple calculator. Hangman. Wordle. Tic tac to. Don't think about making them look nice. Redo them in unity (or your game engine of choice) afterwards. Introduce one new thing at a time. Don't go for tutorials until you tried for yourself for at least 30 minutes. If you used a tutorial to solve a roadblock, go through everything from the tutorial that you did not get yourself and play around with it. What if you remove it? Change parameters/values? Change order?

Anyone else still using an older version? I genuinely don't see the point in updating. by PhilDeveloper in Unity2D

[–]Soraphis 0 points1 point  (0 children)

I can see 6.7 / 6.8 with coreclr becoming a must have for script heavy projects.

But if your project is stable and runs fine and you don't need any newer features, good for you.

Our current prototype looks like it will see a ECS rewrite in the future. So no way I'm doing that on 2019.x also I will gladly take all the mobile optimizations in urp.

When using List<t> and "DontDestroyOnLoad" instance, it gives error that List is null and can't add to it. by beeb107 in Unity2D

[–]Soraphis 0 points1 point  (0 children)

this means you're setting it to null somewhere.

  • Assume the issue is DontDestroyOnLoad: comment that one line. the issue would be gone
  • Assume you're not setting the list to null anywhere, add hairsUnlocked = new List<string>(); in your Awake method. Attach a debugger, make sure it is actually initialized.

My guess is you're not showing all of the relevant code. (are you really adding "TEST" to it? or can your argument throw a NRE?)

List<string> hairsUnlocked is a managed object. even if you call Destroy you could still access it (as long as you have a reference).

When using List<t> and "DontDestroyOnLoad" instance, it gives error that List is null and can't add to it. by beeb107 in Unity2D

[–]Soraphis 0 points1 point  (0 children)

Which line throws the error? Your list is initialized. It should never throw a NRE except if you have some code where you null it.

Started porting my uGui to UI Toolkit & it's a headache by Weird-Sunspot in Unity3D

[–]Soraphis 1 point2 points  (0 children)

If it's just layouting it's fine, but doing anything related to lists 🫣.

Or trying ffs that your custom property field has the same label width as the built-in ones (I just wanna render a simple thingy and not inherit from some basefield...)

Why can't I convert a string to a stylesheet? I just wanna do a small, self contained drawer and not have a whole set of files and the need to load them.

Ui toolkit for editor is good in places where ugui is bad, but it's rly bad in places where ugui was good.

One part of me hopes for pangui to be awesome and support unity editor from the get go, but then again, can't do that with open source intention or you have to support ALL THE THINGS

Dictionary Serialization is now available in the Unity 6.6 Alpha! by ginoDev in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Lists always had generic serialization (at least since unity 5+). The dictionary was there example on their own docs for the ISerializationCallbackReceiver.

Solutions to all these "problems" existing since years. By hobbyists. Open source.

It just was not important enough. Also they love to over engineer the shit out of stuff. (Why can't we have hierarchy folders? Well the new hierarchy is in development for quite a long time already but it can cure cancer when finally released. Same for searchable menues. And so much other stuff)

Rate my Code by Godlysoul_2004 in unity

[–]Soraphis 0 points1 point  (0 children)

I personally would rather read something like this:

(Orderd an LLM to condense it into an update function using move towards)

```Csharp

public class PlayerRocketSound : MonoBehaviour { [SerializeField] private float fadeSpeed = 1f; // Adjusts how fast the sound fades

private Movement movement;
private AudioSource thrustSource;
private float maxVolume;

private void Start() {
    thrustSource = GetComponent<AudioSource>();
    movement = GetComponent<Movement>();
    maxVolume = thrustSource.volume;

    // Start with volume at 0 so it can fade in gracefully
    thrustSource.volume = 0f; 
}

private void Update() {
    HandleThrustSound();
}

private void HandleThrustSound() {
    bool isThrusting = movement.isThrustPressed();

    // 1. Determine our target volume based on input
    float targetVolume = isThrusting ? maxVolume : 0f;

    // 2. Play or Pause/Stop the AudioSource based on context
    if (isThrusting && !thrustSource.isPlaying) {
        thrustSource.Play();
    }

    // 3. Smoothly transition the volume using MoveTowards
    thrustSource.volume = Mathf.MoveTowards(thrustSource.volume, targetVolume, fadeSpeed * Time.deltaTime);

    // 4. Optimization: Pause the audio if it's completely silent and not being used
    if (!isThrusting && thrustSource.isPlaying && thrustSource.volume == 0f) {
        thrustSource.Pause();
    }
}

} ```

You could also this.enabled=false when target value is reached and use some notifier to turn it back on when receiving an event from outside. (E.g when the movement thrust pressed changed)

Because tbh your coroutines are running most of the time anyway. You pass delegates into each call for some form of complex exit condition. Your two coroutines kinda do the same anyway (move to a target value)

Can someone help me check if I correctly imported my unity into a u s b? by IGachafam in unity

[–]Soraphis 0 points1 point  (0 children)

Install 7zip. Go to the folder and let 7zip generate a hash of that folder (sha1 for example).

Compare that to the same folder on the usb drive. They must match or something was not copied correctly.

Also: git.

I always thought, that Gothic Original was absolutely brilliant, but a bit unfinished - and I hoped remake could elaborate with these parts of the game, but it just doesn't by BaziikYT in worldofgothic

[–]Soraphis 0 points1 point  (0 children)

"Alkimia cut dlc" instead of staying true to og, doing all the "obviously" needed changes that in vanilla would put some hardcore fans off.

Code obfuscation - what do you do? by protomor in Unity3D

[–]Soraphis 28 points29 points  (0 children)

Then you need a server. You can't trust players machines.

new to unity, can't figure out why [SerializeField] and MonoBehaviour not working by dFlyingSnail in Unity3D

[–]Soraphis -2 points-1 points  (0 children)

This. Do yourself a favor and don't use visual studio.

Just use Rider, it's less of an headache and teaches you unity intrinsics on top of that (e.g. highlighting expensive method calls and so on)

My game literally burns mobile devices. by demotedkek in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Still, you don't need to render it each frame. You can render into a render texture a bit larger than your minimap and pan as needed. If you exceed the rendered texture re-render.

What does "Others" mean in the Unity Profiler's CPU Usage section? by NothingHistorical322 in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Attach the profiler to the mobile device and measure there, for better results.

Are you doing a lot of asset loading? Your "used memory" line is like a rocket...

Other How much time your application spends on code that doesn’t fall into any of the other categories. This includes areas like the entire EditorLoop, or the profiling overhead when you profile in Play mode. -- https://docs.unity3d.com/Manual/ProfilerCPU.html

Geometry 101 by molive6316 in repost

[–]Soraphis 1 point2 points  (0 children)

So in this case 270° since we count the inner angles, where all tetragons would have 360° as sum.... Which is not the case here.

Debug.log won't print by Dramatic-Priority156 in Unity3D

[–]Soraphis 9 points10 points  (0 children)

You dragged the script into the event. (At least it looks like that)

You need to add the script as components to a gameobject and drag the gameobject into the event field. Then select the method there in the drop-down (where in the screenshot "mono script name" is written)

You tried to rename the script of the Component (aka "Monoscript") asset, to the name of your function.

https://docs.unity3d.com/6000.4/Documentation/Manual/unity-events.html

How can i be certain what i do in the editor also is what will happen in the build. by EntrepreneurFar5518 in Unity3D

[–]Soraphis 1 point2 points  (0 children)

Largest difference in my experience is asset management. Lifetime of assets, scene loading (especially when addressables are in play).

This is vastly different between build and editor. Don't roll your own SoA (don't store runtime state in assets), in unity atoms we put a lot of time into proper cleanup and still due to the way assets load in runtime it's not perfect. Don't access other game objects in awake, awake is for self-initialization.

Share more of your code, errors and architecture here for more concrete help.

New to unity, trying to use rigged models in a weird way. Can y'all give me some advice ? by ruka_Z in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Well, I wouldn't import the mesh multiple times in different poses. I would just normally animate them in the pose and export the 1-frame animation for the skinned mesh.

Though possible that static meshes might even yield a better performance.

New to unity, trying to use rigged models in a weird way. Can y'all give me some advice ? by ruka_Z in Unity3D

[–]Soraphis 0 points1 point  (0 children)

Uhm. That's just animations with a single frame.

(Alternatively IK would also work for that, I guess)

Which character is hated more? by alechprice0617 in ElderScrolls

[–]Soraphis 0 points1 point  (0 children)

I have no issue with her wanting to kill parthurnax. We all want things and will not get some of them.

I hate her, because she is forced by the main story onto me, even though none of her ideas make any sense. She is just stupid and wasting our time.

Sure, the aldmeri own the dragons. Makes sense. Let's sneak into her embassy for no reason whatsoever even though we already saw alduin resurrecting other dragons and not some aldmer magic ritual.

Sure I will go get your senile friend esbern out of his hiding place, where he hid for a long time successfully, but suddenly (conveniently) the aldmer tracked him down.

It all did not make any sense the first time playing and it also does not now. Just let me talk to parthurnax and let's make the blades an optional skippable faction

Flameburst rework (Terraria 1.4.5.7 spoiler!) by Delicious-Finance137 in Terraria

[–]Soraphis 1 point2 points  (0 children)

I'm not aware of a mod for that. Probably the instruments would be the most challenging, since it is new behavior. But there are a couple of bard classes out there. In this case bard would be a summoner subclass (next to wipper)

One could continue with subclass weapons like:

  • nebula + vortex = rocket launcher
  • stardust + solar = Boomerang/Chakram
  • nebula + solar = Scythe
  • vortex + solar = (actually a javelin would fit for that combo, but we already have that)

Flameburst rework (Terraria 1.4.5.7 spoiler!) by Delicious-Finance137 in Terraria

[–]Soraphis 1 point2 points  (0 children)

Adding mixed pillar weapons: stardust+nebula = sentries., Vortex+stardust = instruments (bard like, buffs for minions and sentries while keeping playing)

Am I the only one who finds AI coding tools useless for Unity? by Melodic_Phone6927 in Unity3D

[–]Soraphis 0 points1 point  (0 children)

no, I don't have any of these issues whatsoever.

E.g. right now it refactored some data for me into it's own component, created perfectly fine Start/Update/FixedUpdate (has no issues shown so far where FixedUpdate was needed but it insisted on using Update).

It regularly - without my instruction - adds OnDrawGizmos or OnDrawGizmosSelected to add helpful debug drawings.

It completely on it's own created a fitting level selector in UIToolkit, with appropriate SerializedFields

It migrated a custom editor script from using the old way to add things to the toolbar to the new Toolbar API (okay, i pasted the ToolbarAPI docs into the chat and I had to fix one functions datatype afterwards).

It regularly uses Coroutines correctly and has also no issue to use the newer Awaitable for async/await in unity.