#archived-code-general

1 messages Β· Page 313 of 1

latent latch
#

Any direct way to reference is better than FindObjects

#

so it comes down to preference and organization between singletons and/or events

lean sail
#

the static event sending a reference to itself would be something id try to get away from. if something just wants to subscribe to a specific instance, and ignore all the other instances, the static event is gonna introduce more complexity. You're gonna have to know which instance you want anyways
But if you simply want to be notified of something happening with every single instance then i guess it works

#

although ive never needed such a thing

runic linden
#

Appreciate the feedback. Since I have no formal education in programming I am often unsure how much pain my programming choices wil bring in the long run πŸ˜„

signal wadi
#

So out of interest how do static Actions replace the need for FindObjectsOf<Type>

twilit scaffold
#

Every time i change/populate a value here(SerializedFields), the domain reloads. Is this an issue, or is this expected behavior? i am using 2022.3.26

#

I just do not recall it doing this, up until now, in other projects. seems to be doing it everywhere now though

mossy snow
#

you cropped it out, but you're probably modifying the default values for a MonoScript so yes working as intended. Hopefully you don't think you're editing prefabs

twilit scaffold
#

I am just populating serialized fields in the inspector.

runic linden
# signal wadi So out of interest how do static Actions replace the need for ``FindObjectsOf<Ty...

Its not 100% equivalent but in my case I just need the most recent safe area that my character traversed. So I could either:
a) cache all safeareas and then subscribe to each scripts own Action or
b) cache no reference and listen to the static Action that adds the most recent safearea as a reference.

Even though theoreticall you could call the static Action on Awake() on each safearea to get the all references. Sounds horrible though. πŸ˜„

mossy snow
twilit scaffold
mossy snow
#

you're not setting any serialized fields atm. You are setting default fields. You probably mean to create a prefab and edit its serialized fields, in which case you are doing it wrong and that's why it feels weird to you

twilit scaffold
#

Oh, **** Yes. thank you. Major brain dead moment. sorry you had to say that three times before it registered

vague tundra
#

This is a weird question so I apologize in advance if it bothers anyone.
I've never gotten far enough into developing a game to need to utilize Scenes.
I always thought the rule was "1 scene at a time", but after looking into it, I see that scenes seem to be just a collection of GameObjects, such that multiple scenes can exist in the one "World" at a time.

My question is, is Unity setup in such a way that there is always only ever exactly one "World"/"Universe" and we load/unload scenes into and out of it?
(The answer may be very obvious and justifable, but I'm more interested in any discussion that comes from asking)

final fox
#

Hello, I'm trying to create a wall-sliding mechanic for my character. To do so, I've created a minimal environment with just a ground tile and 2 walls to test it. I have written a script for the mechanic myself, however, the character just sticks to the wall instead of sliding. To fix that, I looked up a tutorial on YouTube which writes a completely different script for the wall-sliding mechanic. So I created a new project, created the same minimal environment, and copied the script from Youtube into it. The result is however the same, the character is just sticking to the wall instead of sliding off.

I can attach both scripts here, however, I'm starting to think it might not be a coding problem. But If it isn't, I don't know what else it could be since it doesn't seem like i'm doing anything wrong in the scene.

vague tundra
final fox
#

Yes, all in order

#

Rigidbody & Box collider for the player,

Box colider & Wall layer for the walls

Ground layer & Box Collider for the Ground

vague tundra
#

Check the players position when they're on the wall. Is the position completely constant, or changing infinitesimally?
(Just throwing some sanity-checks at ya)

final fox
#

I did, it's actually changing sometimes, it will very slowly fall , but it takes breaks if you know what I mean? It will slide for 0.0002 for 2 seconds then stop for 0.5 seconds then keep going. The speed of the sliding changes if I increase the gravity scale of the character, however it remains inconsistent.

vague tundra
#

Interesting.
And you've added physics materials (since ur using Physics by the sounds of it) with the appropriate friction?
Might be worth testing with a frictionless material

Additionally, change whatever your players move speed is to some massive value and see if that shoots him off into space, or if he's really stuck in there (not too massive tho haha)

final fox
#

Booting up the project now to test that

vague tundra
#

I can't promise anything but shoot your script through and I'll have a look, if the tests yeild no fruits

final fox
#

Also nothing changes no matter what modifications I make here

#

^^^ Wall Layer is set to Wall btw

vague tundra
#

Right-click in Assets or whatever, and select Physics Material, I think

lunar python
final fox
#

I have a 2nd script that does have that haha

#

I was testing with 2 different scripts

final fox
lethal solar
#

So I'm new to Unity, and running into an issue that I'm not sure how to solve.
The view area for my player is the selected box here - the chat-like panel on the right side shouldn't have anything render under it, so I want to constrain the camera's render area specifically to the currently selected box.
I'm not sure how to do this exactly - I feel like using a render texture would have downsides? (click raycasts for selecting things not working? not sure if that's an issue to be concerned about or not).
But I'm otherwise not certain about how to deal with this issue.

final fox
# lunar python

I found an easier way of checking for ground/walls other than creating an empty game object by creating an invisibile ray around the character that checks for certain tags, i'll show you in a second

lunar python
final fox
#

yea ok found it

lunar python
final fox
pastel marsh
#

i am making a tic tac toe game and i want to make it single-player
how can i add AI moves to it?

final fox
#

nvm ^^ it still slides slightly

vague tundra
#

Interesting, with 0 friction?

Feel free to paste your script

final fox
#

Yeah

#

Yo

#

it works now

#

wait

#

let me figure out what i just did

#

So, with friction 0, it doesn't stick to the wall, but it also doesn't slide, with anything > 0, it will just stick to the wall, so ig the problem isn't solved

vague tundra
#

Vector2 raycastDirection = transform.localScale.x > 0 ? Vector2.right : Vector2.left;
localScale? Oh, does that 'flip' 2D things?

final fox
#

Yes

#

its for the ray i was talking about

final fox
#

For some reason now the wall slide works properly for the first time ever

#

Howevr it only works on the right wall, and there is no difference between them. But I think I can fix that

vague tundra
#

Sweet, sounds like you've found something to investigate. Goodluck friend

final fox
#

Thank you, couldn't have done it without your physics suggestion, honestly I thought that was mainly a 3D thing, still got a lot to learn about Unity

soft shard
# pastel marsh i am making a tic tac toe game and i want to make it single-player how can i add...

You would probably need some kind of director or state machine that can determine available spots based on whats on the board already, depending on how challenging you wanna make the AI, you could have it pick a spot at random, or "score" spots similar to A* pathfinding logic (MinMaxing) and pick the spot with the highest score, though that could have a lot of games end in ties against players who are familiar with the rules of Tic Tac Toe, though there are probably more simple approaches online searching something like "tic tac toe ai C#" or "tic tac toe ai algorithm tutorial"

real anvil
#

i.e unless you dumb down your AI your games will always be a draw

pastel marsh
sweet swift
#

Can someone help me? I am working on an Android multiplayer game project, and I am experiencing stuttering while playing the game. Is there any solution to fix this?

lean sail
real anvil
#

Tris are fine, so your GPU isn't the bottleneck

#

Probably too much garbage being generated

#

Open the profiler and see

#

Window > Analysis > Profiler I think

#

I reckon it's GC issues

opaque sinew
runic venture
#

nvm prolly wrong channel

sweet swift
real anvil
#

Whats in the third person controller

#

The update loop specifically

#

The best way is to profile it

#

(and on device rather than editor)

sweet swift
lean sail
real anvil
#

Before we can actually help you need to show a screenshot of the profiler or post your update loop

#

If you have narrowed it to your third person controller

frail dust
#
    {
       
            GameObject removedLaneLeft = Lm.instantiatedLanesLeft[Lm.instantiatedLanesLeft.Count - 1];
            GameObject removedLaneRight = Lm.instantiatedLanesRight[Lm.instantiatedLanesRight.Count - 1];


            Collider2D leftLaneCollider = removedLaneLeft.GetComponent<Collider2D>();
            Collider2D rightLaneCollider = removedLaneRight.GetComponent<Collider2D>();

            Debug.Log("Function called, waiting for foreach loop");

            foreach (GameObject i in items)
            {
              if (i != null)
                {
                    bool isWithinBoundsLeftLane = leftLaneCollider.bounds.Contains(i.transform.position);
                    bool isWithinBoundsRightLane = rightLaneCollider.bounds.Contains(i.transform.position);
                    Debug.Log("Foreach loop reached");


                    if (isWithinBoundsLeftLane || isWithinBoundsRightLane)
                    {
                        Debug.Log("Speed changed");
                        i.transform.position += new Vector3(0, ((Speed + 5f) * Time.deltaTime), 0);
                    }
                    else if (i.transform.position.x == mlp1 || i.transform.position.x == mlp2 || i.transform.position.x == mlp3 || i.transform.position.x == mlp4)
                    {
                        Debug.Log("Cars Destroyed");

                        items.Remove(i);
                        Destroy(i);
                    }
                    else
                    {
                        Debug.Log("NONE OF CONDITION MATCH");
                    }
                }

            }
  
    }```

My GameObject 'i' is gets destroyed occasionally which isn't the problem. But the problem is I face missing reference exception. For which I have added if (i != null), but this causes the unity engine to be freeze and gets in infinite loop ig
knotty sun
fervent furnace
#

you cant modify collection is foreach

frail dust
knotty sun
#

Also there is abasolutely no point is just butting ou8t text messages in your debugs, include some variable data so you know what is going on

knotty sun
frail dust
knotty sun
#

i >= 0

frail dust
#

yeah

#

also Destroy(i) is correct?

fervent furnace
#

i is int

knotty sun
#

you will need some thing like

GameObject go = items[i];

then replace all i references with go

#

this is definitely not Code General territory

frail dust
#

got it

frail dust
fervent furnace
#

beginner code question

knotty sun
frail dust
#

how would ik that this is a beginner question tho

#

thanks anyways

unique delta
#

i m getting this error Random' is an ambiguous reference between 'UnityEngine.Random' and 'System.Random' at this line "float randomnum = Random.Range(0f, 90f);" i made this a half year ago and only now it gives me this error

thick terrace
acoustic laurel
#

is dashing just a player sliding really quick across the world grid with cool animation?

thick terrace
unique delta
#

A 'using namespace' directive can only be applied to namespaces; 'Random' is a type not a namespace. Consider a 'using static' directive instea

fervent furnace
#

the syntax of using XX=AA.BB.XX is using alias not using namespace
show your code

unique delta
#

i figured it out thanks

keen forge
#

hey guys, have a problem. I started making settings screen in my game and want to provide standart set of settings for player. The problem is
Screen.SetResolution(640, 480, FullScreenMode.ExclusiveFullScreen, new RefreshRate() { numerator = 60, denominator = 1 });
This function literally does nothing. It just doesnt changes resolution. I know that is shouldnt work in editor, so i test it in build. I tried few versions of unity and it doesnt helped.

leaden ice
#

Have you verified it with logs?

keen forge
#

yep

thick terrace
#

the supported refresh rate might be slightly different for example

#

aside from that, have you looked at the logs from a build?

keen forge
placid summit
#

anyone know a good source for geometry maths? I want to know which of 2 lines is most parallel to another which the slope check could do though the slope is infinite as it becomes vertical!

#

chatgp(mention it not) suggests slope comparison and then struggles with my mention of divide by zero case!

fervent furnace
#

In mathematics, the dot product or scalar product is an algebraic operation that takes two equal-length sequences of numbers (usually coordinate vectors), and returns a single number. In Euclidean geometry, the dot product of the Cartesian coordinates of two vectors is widely used. It is often called the inner product (or rarely projection produ...

leaden ice
#

(Dot product will be more efficient but Angle is more understandable)

placid summit
#

yes thanks - dot product is good

leaden ice
#

Just make sure you normalize your vectors before comparing dot products

placid summit
#

I always forget dot product when not doing lighting

fervent furnace
#

advanced:
since the "end point" of every unit direction vector lie on a unit circle (if they are start at origin) that means you can do a nearest neighbor search to get the closest point==closest direction

placid summit
#

true dat

rough tartan
#

Do you know if I can create the name of an instance based on the value of a variable? I'm creating a websocket server for my game and I want to use instances of a "game" object to manage each game in progress, and to differentiate each game I wanted to know if I could name each instance of "game" with its ID which is a value defined by the player .

leaden ice
#

You should probably store that information in a custom script instead.

rough tartan
knotty sun
leaden ice
#

If that's possible? Of course.

rough tartan
rough tartan
leaden ice
#

You can also give them whatever names you'd like, but that in and of itself doesn't particularly help you access them. It depends on what your access patterns will be like. If you'd like to access them by player ID or something then a Dictionary makes a lot of sense

leaden ice
knotty sun
#

why would they all have the same name if that name is being supplied by the players

#

do you not know how to use a Dictionary?

rough tartan
leaden ice
#
myDict[GameID] = new Game();```
knotty sun
#

but you can do

Dictionary{string,Game> games;
...
games.Add(GameID, new Game());
rough tartan
#

Ok I'll look into using a dictionary, thanks for your help!

knotty sun
#

I'm just wondering how you think you were going to create a WebSocket Server without using dictionaries? It seems like this is new to you

rough tartan
buoyant mural
#

Reset() on a ScriptableObject is supposed to be called as soon as it's created and when the reset button is called, but I'm having a problem where it never calls when I create it

#if UNITY_EDITOR
    private void Reset()
    {
        string assetPath = AssetDatabase.GetAssetPath(GetInstanceID());
        string fileName = System.IO.Path.GetFileNameWithoutExtension(assetPath);
        if (string.IsNullOrWhiteSpace(fileName)) return;
        itemName = fileName;
        Debug.Log("i just reset earth");
    }
#endif"```
rough tartan
leaden ice
#

You have an early return that might be running

buoyant mural
#

oh yea i forget that

#

oh wait

#

u just made me realize the mistake

#

I looked at the return and it's checking the wrong string

#

thanks bro

#

Is Awake after or before Reset()?

leaden ice
#

(before)

buoyant mural
#

Thanks, but I've seen Awake get called again when creating the file and clicking enter(saving it) but the log had [Worker0] in it

#

It's quite a confusing situation

#

I'm just trying to make the string itemName become the fileName upon creation and saving

#
#if UNITY_EDITOR
    private void Awake()
    {
        Debug.Log("Item just created!");
        string assetPath = AssetDatabase.GetAssetPath(GetInstanceID());
        string fileName = System.IO.Path.GetFileNameWithoutExtension(assetPath);
        //if (string.IsNullOrWhiteSpace(itemName)) return;
        itemName = fileName;
        Debug.Log($"And it's been called [{itemName}]");
    }
#endif``` Awake is when I create the item immediately, then when i  give it name and save, it becomes in this state [Worker0]
leaden ice
#

Couldn't you just do itemName = name;?

buoyant mural
#

fileName?

leaden ice
#

no

#

just name

#

isn't that the same as the filename for a ScriptableObject always?

hexed pecan
#

AFAIK yes

leaden ice
#

(in fact, itemName seems kind of redundant since name exists)

#

You could also just make itemName a property

#
public string itemName {
  get => name;
  set => name = value;
}```
#

then you don't need to serialize any extra data or worry about this reset stuff

buoyant mural
#

hmm, it only works as a property for me

dusk apex
buoyant mural
#

I tried initializing it as the value

    public string ItemName = name;```
leaden ice
leaden ice
buoyant mural
#

I know

#

I don't want it to be a property tho

leaden ice
#

Well making it a field gets you back to square one

#

I guess an understanding of your goal for this might help

buoyant mural
#

yea

leaden ice
#

What's the reason you need it to be a separate field?

buoyant mural
#

I'm trying to make it that as soon as u create an item with a name, the item name gets initalized as that name, sometimes it helps being more effiecent

leaden ice
#

Right but why does it need to be a field and not just a property?

buoyant mural
#

Can that property's value be changed?

leaden ice
#

Of course it can

#

it has a setter

buoyant mural
#

I never did a property like that before so

leaden ice
#

That's the standard way to make a property

buoyant mural
#

oh yeah ofc it can lol

dusk apex
#

What the purpose of this itemName variable?

buoyant mural
#

It's what's gonna be displayed in the game UI

leaden ice
buoyant mural
#

So how do I make that serialized in the editor ?

dusk apex
#

Not sure what you're intending but the game ui should just be able to access the name property of the reference object.

leaden ice
#

because name is already part of the SO

buoyant mural
#

I meant the property

dusk apex
#

Are you just trying to make it visible to the inspector?

leaden ice
#

what benefit would that have?

buoyant mural
#

I meant showing it in inspector

leaden ice
#

Well it would be the filename

#

But if you want to show it in the inspector you could use a custom editor or NaughtAttributes

buoyant mural
#

I do have a custom editor

leaden ice
#

and have a callback that changes the filename

buoyant mural
#

Ok, I fixed everything

finite ferry
#

Sorry for the late reply, but I found a better solution than my super/sub-class structure, so I don't need help with that problem anymore. Thanks anyways!

#

But you're probably right, if I really wanted that to work I'd most likely need to make a custom inspector (which isn't really worth it).

buoyant mural
zinc parrot
#

Hey so is there anything I can use that has the read/write performance of a normal array but the ability to manage the memory manually of a native array?

zinc parrot
#

yeah thats the native array I am using
the ability to manually manage the memory lifetime is incredibly useful, but it seems to have slower read/write?

leaden ice
#

You're meant to use it within the job system generally

#

with the burst compiler the access should be quite fast

zinc parrot
#

yeah im using it within a task

leaden ice
#

task != the job system

zinc parrot
#

I know tasks are not jobs but

#

yeah

#

tasks were just easy multithreading for me

leaden ice
#

You can always use unsafe C# code

#

which lets you deal with pointers directly

fervent furnace
#

unsafelist

zinc parrot
#

oh wait really?

fervent furnace
#

no safety check

zinc parrot
#

I didnt know that

fervent furnace
#

btw i didnt brenchmark it with normal c# array (though you cant still use normal c# array in job system), you can test the i/o per seconds by yourself

zinc parrot
#

ok
is there an array alternative to unsafelist?

fervent furnace
#

unsafelist is just a wrapper of pointer+length+capcaity (c++ vector), nothing more than that

zinc parrot
#

ahhh ok

fervent furnace
#

access the element by .ptr[] to bypass the indexer, the indexer is pretty annoying

solar wigeon
#

!code

tawny elkBOT
solar wigeon
modern creek
#

When I Destroy a (child) game object on an instantiated instance, then instantiate a new instance - the new instance seems to not have the game object... is that normal?

For background - I have a dialog popup that has a "click catcher" that I have to move out of the hierarchy of the dialog (because of raycast catching conflicts with a component in that dialog). When the user clicks on the "click catcher" the dialog destroys itself, along with the click catcher.

When I instantiate another dialog - the new one doesn't have a click catcher.

leaden ice
modern creek
#

Yeah I'm uh.. not sure how though.. I can paste some code if that's helpful

leaden ice
#

definitely yes

modern creek
#
// screen that instantiates these dialogs
FtueItemRenderer fir = Instantiate(FtueItemRendererPrefab, transform);
fir.Show(...);

// FtueItemRenderer
public void Show(...)
{
 ...
  SimpleCancelDialog.Initialize(Hide); // on pointer down callback = Hide()
  SimpleCancelDialog.transform.SetParent(transform.parent); 
}

private void Hide()
{
...
  UnityEngine.Object.Destroy(SimpleCancelDialog.gameObject);
  UnityEngine.Object.Destroy(gameObject);
}
leaden ice
modern creek
#

SimpleCancelDialog is basically a full screen image with raycasts on that calls the callback in initialize

#

it's in the prefab

leaden ice
#

and what object is this script on?

modern creek
#

and on the screen that creates these prefabs, it's linked to .. the prefab, as usual

#

little noisy screenshot, sorry - but the "screen" that's instnatiating these is "GameRenderer", and the prefab is under my mouse and .. correctly linked to the prefab

leaden ice
#

or it's assigned to an object inside the FtueItemRenderer prefab?

modern creek
#

the latter

leaden ice
#

Why is this necessary?

  UnityEngine.Object.Destroy(SimpleCancelDialog.gameObject);
  UnityEngine.Object.Destroy(gameObject);```
Shouldn't the second line implicitly do the first?
modern creek
#

basically FtueItemRenderer "takes care of itself" and has it's own cancel click catcher thing... but for other reasons, I have to move this click catcher out of the hierarchy (I'm using a 3rd party unmask component which does some kind of messed up things with the unmask)

leaden ice
#

if SimpleCancelDialog is a child of the FtueItemRenderer?

modern creek
#

SimpleCancelDialog.gameobject is out of the hierarchy of this object here

#

since it's been moved to the parent

leaden ice
#

does that happen in Initialize or something

modern creek
#

yeah, in Show()

leaden ice
#

oh right SimpleCancelDialog.transform.SetParent(transform.parent);

#

it becomes a sibling

modern creek
#

aye

leaden ice
#

I can't tell from the context so far. I would expect that to happen if somewhere FtueItemRendererPrefab gets reassigned

modern creek
#

I can video it if it's confusing.. .there's kind of a lot going on with this hierarchy and prefab and stuff though, I'm trying to pare it down to the minimum reproduceable code

leaden ice
#

maybe that's happening by accident somewhere

modern creek
#

lemme snap a quick vid while I click around a bit.. standby

twilit scaffold
#

None of the Odin type "Custom Inspector" tools seem to support NetworkBehavior I am currently just trying to get a collapsible list of SerializedFields
they have all failed once MonoBehaviour becomes NetworkBehavior

#

this also includes NaughtyAttributes. Thre is a slight possibility that i messed up my test of NaughtyAttributes, i will test again later, but i am sure the others did not work. the only one i did Not test was Odin, since they have a wacky license agreement. I buy the thing just so they can inform me that i have to pay them a percentage if i make more than X $. I call BS. so, they remain utilized

modern creek
#

So basically - FtueItemRenderer prefab has a "ClickCatcher" GO of with SimpleCancelDialog on it - i instantiate these as little .. you know, full screen FTUE dialog helpers.. any click on it dismisses it. The first one that gets instantiated correctly moves the ClickCatcher up and out of the instantiated item's hierarchy.. then when it's dismissed, both the ClickCatcher and FtueItemRenderer get destroyed.. but when I instantiate the next one (again from the GameRenderer)... this 2nd one doesn't have a ClickCatcher on it..... and I don't know/understand why

#

I mean, I could have the game renderer "be aware" of the cancel dialog GO and destroy it, but that feels hacky - the game renderer has enough shit going on already (look at all the serialized fields πŸ€¦β€β™‚οΈ).. even in spite of my best efforts at components that take care of themselves

exotic tartan
#

I need some advice with how I should load and unload objects.

I have about 11 zones that I am not able to separate in the hierarchy.
If the player is in zone 1 I only want to load objects in zones 1, 2, and 5.
If the player is in zone 2 I only want to load objects in zones 2, 4, and 7.
etc.

What would be a good way to set this up? I thought about using tags for the objects in each zone, but I think searching objects by tag is laggy.
I also thought about creating a script that searches for every object by tag, then stores the references for later use. This would cause a large amount of lag at the beginning, but should be fine after right?

leaden ice
devout herald
#

tried to add in occlusion culling to my game, all it did was hide everything i couldnt see from behind.
every single wall, any tile that does not have transparency is both occluder and occludee, the parameters are default. both because i dont know what they mean

leaden ice
#

(also not sure what the actual question is)

devout herald
leaden ice
devout herald
#

ah alright

exotic tartan
spring creek
#

You should google object pooling for the common patterns

exotic tartan
leaden ice
#

And yes this is called pooliong

versed marsh
#

how would one go about fixing a rare case like this? the player is stuck between two walls, and obviously can't jump since they're not passing a grounded check. Curious if anyone else has encountered something like this and how they went about solving it.

crude mortar
#

although some games just actually softlock you and you have to reload from checkpoint / lose / whatever

versed marsh
knotty vessel
#

Hey, my game is taking awfully long to load when hitting the play button and is then stuck in the completing domain part.

I tried to profile it but I can not figure out what scrip(s) cause this giga spike πŸ˜…

molten crypt
#

How can i make a plane 2 sided in 3d?

#

Right now you can only see the material on one side of the plane

soft shard
soft shard
versed marsh
molten crypt
#

Ohh

versed marsh
versed marsh
molten crypt
#

gotcha

dense estuary
#

I am using a rigidbody for movement in unity, but the player is sliding down slopes and moving up them super slowly, I have just created a method that detects the platform the player is on, and the angle of the platform. How can I adjust the velocity of the player based on the normal of the platform they are on? I tried rotating the input velocity but that didn't do anything. Here is my code: https://hastebin.com/share/ucekeqataq.java

topaz ocean
#

How expensive are the "TransformDirection" and "InverseTransformDirection" commands? I use them about 4 times in a single fixedupdate for one of my components.

loud wharf
#

Felt curious, is it possible to get the C# sln file and build it?

#

From script ofc.

late lion
mellow hill
#

Hey guys, I have a question. It's not a code or Unity related question per-say but I was wondering for those who have worked with databases within Unity, how have you handled the client-server architecture? Right now I have created a WebAPI for my project and while I have Unity hooked up to the WebAPI, the API is using localhost at the moment. I was wondering if there are any free ways of hosting that API/database so perhaps a small team could access the API/database remotely?

chilly surge
#

Cloud platforms offer free tiers, GCP and Oracle Cloud have forever free VPS that's probably going to be sufficient to host your stuffs.

#

Alternatively, do you really need all of your team to remotely connect to the same backend? If not, have them host it locally on their own machine.

nova seal
#

I need help with a unity problem that I have dm me @everyone

#

I need help with a unity problem that I have

spring creek
#

Just ask your question

#

notlikethis also don't cross post

mellow hill
chilly surge
#

Are you trying to have your devs connect to your production backend during development?

#

Because uh, that's a terrible idea.

mellow hill
last island
#

Separate dev environment from staging and prod environments

#

Always

chilly surge
#

Having a deployment guide for each dev to deploy the backend on their own machine is one option

mellow hill
#

Oh for sure, you can have both a testing and production database. That's what I intend to do

chilly surge
#

But containerization like Docker is made to solve this problem, you just build a container and have devs run it.

last island
#

Yeah, make a container that runs the dev environment

#

Make devs use the container

#

On production you can use the same bindings, now the app just connects to a prod container

mellow hill
#

Do I have to pay to host the docker container?

last island
#

Nah.

#

They can run it locally

mellow hill
#

Awesome, I was thinking about a set up like this. This will make things a lot easier. Thanks guys πŸ™‚

last island
#

What the docker container does is help you reduce complexity of development by having it be a packaged self-contained environment that anyone can deploy anywhere regardless of host machine.

#

No longer "works on my machine"

chilly surge
#

You can think of it as a virtual machine with everything you already set up, and the user just needs to boot it.

last island
#

The cool thing about it is that the app that gets developed can use the exact same API calls because the production container will be the same container, but with a different environment handling whatever is needed on production side of things.

#

The app is non the wiser

mellow hill
#

I haven't worked with docker but I'm aware of what it does and the benefits but I thought you needed to pay for the hosting. Since I don't then I think that would be an ideal solution. I can run two docker containers for a testing environment and a production environment

chilly surge
#

Not even that, you can just send the Docker file to dev and the dev runs it locally on their own machine, the same machine that's doing their Unity stuff.

mellow hill
#

Awesome, thanks πŸ™‚

lean sail
dense estuary
#

Whats wrong with the FromTo rotation?

lean sail
dense estuary
#

The ray isnt drawing where the movement should be going

solid slate
#

https://hastebin.com/share/enikuzuxiy.csharp why does it stop on first attack, swing 2 and 3 bools are never set to true i followed a tutorial btw

cosmic rain
dense estuary
neon junco
#

Hey, so I was thinking of making a Utility AI for an enemy NPC that executes actions based on probability. It would collect this information using a ray-cast sphere to understand what is around it. So Utility AI would be its brain and the ray-cast sphere would be its eyes. Has anyone dove into this for game development and can share anything that might roadblock me? planning on achieving this using C#.

dense estuary
cosmic rain
cosmic rain
# solid slate alr thx

Adding debug logs or stepping through the code with a debugger would help solve the issue. I'd double check that the setup is exactly as in the tutorial first though.

cosmic rain
dense estuary
lean sail
neon junco
# cosmic rain Well, this is a very abstract explanation. There are many way to implement what ...

So the full detail of the use of this:

Enemy NPC walking doing its patrols then when a player comes with in range of the detection sphere or starts shooting at the enemy NPC the NPC would evaluate what it is around it to use as cover or if the area it currently is has the most cover. The AI would first do a probability of it being hit by the player and if its in a high enough range it checks the better cover in its area or evade that higher probability of being shot and chooses the animation appropriate for that cover that it is under. Then would evaluate when its best to return fire to attack the player or advance towards the players last position.

The information it would receive would be from the sphere and give everything its own tag being a pillar or rocks or wall etc.

The AI would know the probability of each due to the position it currently is and what has the better coverage by giving each static object its own stats of being shot at if behind the cover and coverage of the NPC or player so it works for both the enemy NPC as a attack strat or defensive strat. It would also make its own probability using those base stats depending where it is and where the player was last seen.

cosmic rain
dense estuary
# lean sail ```cs velocity.x = Mathf.Lerp(velocity.x, inputVelocity.x, t); velocity....

I just rewrote that to account for the y axis and also applying gravity manually but that makes me still slide down slopes. Here is my code now. Here is a video: https://streamable.com/q1lffb

Watch "2024-04-26 23-16-05" on Streamable.

β–Ά Play video
dense estuary
# lean sail ```cs velocity.x = Mathf.Lerp(velocity.x, inputVelocity.x, t); velocity....

I fixed the gravity so the player nolonger slides down slopes, however, the player now goes up the slopes slightly due to the gravity now pointing to the slope. Heres the code. https://streamable.com/5oua4k

Watch "2024-04-27 00-23-56" on Streamable.

β–Ά Play video
solid slate
#

i was watching a tutorial and i saw this guy make a float and he put {get; private set; } after the float name what does it mean and how and when do you use it

lean sail
solid slate
#

just for security?

dense estuary
#

By default variables are private

#

I believe

lean sail
solid slate
#

il try looking more

lean sail
#

theres really a lot of reasons that they are used, a simple example is just the basic one you wrote.

public float SomeValue {get;  private set; }

it is publicly available for things to get (read) but can only be set (write) from within this class

#

Otherwise you need the java way

float someValue;
public float GetSomeValue() { return someValue; }
void SetSomeValue(float someValue) { this.someValue = someValue; }
somber nacelle
#

properties should also be preferred over public fields so you have finer control over what can access your data and how that data is accessed. you should very very rarely use public fields

lean sail
#

Ah im too tired rewrote my example like 3 times but now its correct lol

prime cosmos
#

has anyone ever seen this error before:
BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
I get it when I try to export my project to iOS and it fails build every time. Tried reimporting all assets that did not work.

somber nacelle
spring creek
dense estuary
#

wouldnt that make me hop down the slope

lean sail
#

if you are handling gravity yourself at all, i would just disable it entirely and do whatever you want yourself

#

you want it to be 0 if on a slope you're allowed to stand on

dense estuary
lean sail
dense estuary
#

Thats what I'm doing in the code I thought?

lean sail
#

πŸ€·β€β™‚οΈ im still not sure why you are adding gravity in the direction of the floor in that first statement but really id just add debug draw rays for everything when making a movement system

#

im not even sure what your IsGrounded() logic is doing so i cant be certain that the else statement part is even running

dense estuary
#

I think hit.normal is null if the player isnt grounded.

lean sail
#

normal is a vector3, it cannot be null

dense estuary
#

so its Vector3.Zero?

lean sail
#

instead of assuming what the code is doing, add debugs and check

#

yes though, a vector3 is by default zero

dense estuary
#
if (!IsGrounded())
{
    rb.AddForce(Physics.gravity, ForceMode.Acceleration);
}```
solid slate
indigo verge
#

Question, if you edit the "motion" of an Animator's State through code during runtime, does that just affect the one object, or all objects using that animator?

gray mural
#

This way, you wouldn't need to worry about the sphere cast being casted correctly

#

And in the real world, it's usually so that the gravity is applied to you not just when you jump or fly (do you?), but also when you walk and sit

#

Therefore, simply always adding the gravity to the bottom, which is, yeah, Physics.gravity = Vector3.up * -9.81f, is a great solution

lean sail
#

That's all fine in theory, but video games do not reflect real life. The gravity being applied every fixed update is what's causing them to go down slopes over time. There is no need to fight the system, the gravity simply doesnt need to be applied if they can stand on such slope

#

Using real life would only be applicable if you're trying to make the best active ragdoll simulator. Which alone requires extensive skill

gray mural
lean sail
#

This really reads like AI...
Rotation of the player to match gravity?

gray mural
#

Consider reading the 2nd option fully.

#

Does this perhaps make it more clear for you?

lean sail
lean sail
gray mural
gray mural
#

The arrow is supposed to show the gravity's direction, perpendicular to the slope in this case.

wintry gust
#

Which I believe is closer to what you actually want

gray mural
lean sail
gray mural
#

The normal gravity is applied to the bottom, shown with the blue arrow.

#

The green arrow is the force you want to apply to the player in order it to move forward (or, well up? cause it's a slope)

#

The red arrow is the force I'm talking about. The force which is supposed to be applied perpendicularly to the slope's angle.

#

(there's even the 90deg angle shown)

lean sail
#

There is no red force. This simply doesnt exist, that red line is just the negative of the "normal", since it's supposed to point outwards

wintry gust
#

The slope up vector is the same as the red arrow, just flipped basically.

#

Also that is very good art πŸ‘

gray mural
#

It should be implemented for the player not to slide down the slope, as it usually happens with the blue arrow

gray mural
#

This is, actually, what is usually done in this kind of games, when the player climbs different surfaces, like slopes, walls and ceilings etc.

loud wharf
#

Tangent meanwhile is the direction that a point in a line is going to.

gray mural
loud wharf
#

You can calculate tangent by:
lim -> Delta = infinite: arctan(y1 - y2 / x1 - x2)
Where Delta is the span between 1 and 2 and gets more accurate as delta goes toward infinity.

gray mural
loud wharf
#

Normal is a direction. Not really a vector. Mathematically speaking.
Normal is passed as a Vector struct in unity but it has no magnitude (magnitude = 1) and you normally use it as a direction component.

#

To actually be a vector it must have direction and magnitude.

gray mural
#

Well, I don't think the tangent is required to find the normal of the direction.

#

You dimply replace the x with the y

loud wharf
#

Yeah.

gray mural
#

Don't mention the image I sent. That was wrong. UnityChanDown

loud wharf
#

Real.

#

if you really want to work with Angles or Rotation structs, i happen to made two structs. UnityChanThumbsUp
Angle struct and SinCos. I made SinCos after feeling bad that i use about a ton trig functions per frame for one thing.

loud wharf
gray mural
#

The x and y axes are replaced.

#

And so the angle between them is 90

slim gate
#

How do you guys handle tracking of stats/ unlocking achievements on steam? I have been thinking about my implementation for a while but it seems not ideal.

On the one hand I want to store stats per stage in my game, but also stats for the whole playthrough. So I was thinking of something like this:


public class Stats
{
    public List<Stat> StatList = new List<Stat>()
    {
        new Stat("ENEMIES_KILLED"),
        new Stat("DAMAGE_TAKEN"),
        new Stat("DEATHS"),
        new Stat("GOLD_EARNED"),
        new Stat("GOLD_SPENT"),
        new Stat("DEPTHS_SURVIVED"),
        new Stat("REVIVES_DONE"),
        new Stat("REVIVES_RECEIVED"),
        new Stat("ITEMS_CRAFTED"),
        new Stat("ITEMS_REFORGED"),
        new Stat("ITEMS_BOUGHT"),
        new Stat("ITEMS_SOLD"),
    };
}

public struct Stat
{
    public Stat(string name)
    {
        Name = name;
        Value = 0;
    }

    public string Name;
    public int Value;
}

To hold all the data for the stats, and then a handler for everything with something like this:

private static Stats _depthStats = new Stats();
private static Stats _gameStats = new Stats();

public static void DepthFinished()
{
    // TODO: Add current depth stats to gamestats and set new depthstats
}

But it feels wrong to me, I want to unlock achievements straight when the condition is fulfilled and not at the end of each stage/ depth, but also checking for x conditions and manually adding one if statement for each achievement always when a stat is increased feels wrong and inefficient. There must be a better solution?

gray mural
loud wharf
#

x normally comes first.

gray mural
wintry gust
#

This is a surprisingly in-depth conversation for a problem that's somewhat basic lol

loud wharf
gray mural
wintry gust
#

I'm enjoying it, ignore me! EatPopcorn

gray mural
loud wharf
#

This also comes with unity custom editor. Albeit ranged from -180 to 180. SinCos can't express entire rotations.

loud wharf
gray mural
#

I have a Helper script with all the possible static classes like RectHelper, MathHelper, TransformHelper etc.

gray mural
#

Someone really loves angles UnityChanOops

loud wharf
loud wharf
#

Then i found out unity can't serialise readonly so i have to add that in too.

gray mural
#

But well, why would you even spend your time writing literally the full Angle struct? πŸ€”

wintry gust
loud wharf
loud wharf
#

Cause if that's the case, why people even use Vector2 instead of a (float x, float y)?

gray mural
gray mural
#

Also, this looks strange

public static Angle Deg360 => one_revolution;
public static Angle Deg270 => three_quarters_revolution;
public static Angle Deg180 => half_revolution;
public static Angle Deg90 => quarter_revolution;
public static Angle Deg45 => eight_revolution;
public static Angle Deg1 => one_degrees;
public static Angle Deg0 => no_rotation;

public static Angle OneRevolution => one_revolution;
public static Angle HalfRevolution => half_revolution;
public static Angle QuarterRevolution => quarter_revolution;
public static Angle EigthRevolution => eight_revolution;
loud wharf
#

I'm not really sure if it makes a difference for a readonly static.
There's a multiple getters for the same value because i felt like it. I just wanted to express the same constant value in different measurements.

gray mural
#

Deg360 = OneRevolution

loud wharf
#

Angle can go above 360. And below -360.

#

Well angle is a scalar quantity. My source lol.

vague tundra
#

How might one store some data between scene loads?
And how might one store data between game runs?

vagrant blade
#

Using something like JSON

vague tundra
#

Cool - and that would be a suitable option for both saving state "quickly" between scenes, as well as the entire game state?

vagrant blade
#

Both yeah. Saving the state between scenes is saving the entire game state.

vague tundra
#

Awesome, cheers(:

lean quiver
#

Hello

#

I want to make navmesh agent wander and target the player how to do this?

#

I'm beginner to navmesh agent scripting

vagrant sparrow
#

Does anyone else have trouble with Visual Studio and creating new files in the Unity Project Explorer? Every single time I create a new file, VS will eventually freeze up and require me to kill the process. This happens in all Unity 2022 versions with VS 2022 and newest Visual Studio Editor Package. (NOT VS Code)
My workaround is to declare classes in the same file and then use the VS refactor "Move to new File" instead, but this is driving me nuts

chilly surge
chilly surge
#

Okay just making sure because your original message says Code.

vagrant sparrow
#

Ah yeah, sorry I just noticed now

#

Also when attaching the debugger I very often get a 30-60 second Unity Editor freeze before I can continue. Not sure if related. Ive tried reinstalling both

vagrant sparrow
#

Its not alright. I dont want to wait, and it didnt use to be like this

gray mural
#

Well, it's always been this way for me

vagrant sparrow
#

Ive been doing this for 12 years. It wasnt always like this πŸ™‚

latent latch
#

restarting the editor works for me at times

narrow kite
#

(problem solved)

#

I use this code for my scp173-like enemy, which chases after the player when the player doesn't see it

vagrant sparrow
#

try if (Physics.Raycast(cam.transform.position, dirToEnemy, out hit, distToEnemy, 1 << groundLayer))

knotty sun
narrow kite
vagrant sparrow
#

Also, ensure that your ground objects are actually on the GroundLayer

woeful narwhal
#

is there a way to check the canvas a gameobject is on?

gray mural
gray mural
woeful narwhal
#

like ive got a gameobject on a canvas and i need to find the rect transform of the canvas so i need a referance to either its recttransfrom or its gameobject

woeful narwhal
#

sorry im not very good at explaining

gray mural
#

You want to access Canvas' RectTransform?

yourCanvas.GetComponent<RectTransform>();
knotty sun
#

ok, generally a Canvas is a Root object so you can use gameObject.transform.root to refer to it

vagrant sparrow
#

youve got a GameObject UNDER a canvas right? as a child of the canvas? If thats the case you can either use GetComponentInParent<Canvas> or simply use an inspector reference

woeful narwhal
#

does get component in parent still work with multiple children

vagrant sparrow
#

Gets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.

woeful narwhal
#

ok ill give it a try sorry for the hassle

buoyant mural
knotty sun
#

not necessary, if the Canvas is on a Root game object transform.root will give you the RectTransform you want

vagrant sparrow
#

Also that, canvases are usually the root

woeful narwhal
#

the canvas is on a organisational empty game object called canvases

vagrant sparrow
#

Canvas is a built-in Unity component, so if you decided to call an empty gameobject "Canvas" (without having an actual Canvas on it), you should lead with that when asking for help πŸ™‚

woeful narwhal
#

no yeah im still trying to find the canvas component but ive got all my canvases on another gameobject called canvases for the sake of organisation

knotty sun
woeful narwhal
#

I was gonna do that but i wanted to use the amount of references on my singltons sparringly because having to many would make unnessary strings of referances throughout my code

latent latch
#

GameManager that has a reference to GameUI

#

fixed your problem

knotty sun
#

better that than wasteful GetComponents

woeful narwhal
#

yeah good point

#

what does get components do that are so bad anyways

knotty sun
#

in your case it has to scan through the hierarchy which, by the sound of it, is unnecessary complicated

#

when you add gameobjects purely 'for organizational' purposes you are doing yourself no favours

woeful narwhal
#

is there a way to make folders in the hieracy then?

#

because i just struggle havign heaps of gameobjects lying around when im trying to find specific ones

knotty sun
#

no, but why would you need them?

woeful narwhal
#

because just say when my project gets more complicated and i have like 10 canvases then it would be helpful to have them under one folder or gameobject to make them easier to find

#

not saying id ever get 10 canvases

#

but i use it more for different cameras

knotty sun
#

there is this amazing thing that the brain can do, it's called 'knowing what you have done and remembering it'

woeful narwhal
#

ive got a pretty bad memory

knotty sun
#

well you will have if you never exercise it

near vector
#

how do I do this

knotty sun
#

you put the variable initialization into the Awake method

near vector
#

ohh

#

thx so much

knotty sun
edgy stump
#

Hey guys! I have a problem. When I selecting font in dropdown menu, It's importing wrongly. Like this:
https://hastebin.com/share/segajiqiki.csharp

dense estuary
knotty sun
gray mural
buoyant scroll
#

I have my PC game that I am trying to convert its input controls to VR. I'm confused on how to do that, since I've never done that before since I'm new to Unity. How can I do that?
https://hastebin.skyra.pw/cadopuqunu.cs

dense estuary
#

like this

#

This makes the player not slide down the slope, but now they struggle going up.

#

I'm going to try something rq.

pastel marsh
#

my code for minimax is something like this

 private int MiniMax(int depth, bool isMaximizing)
    {
        if(CheckWinner() != "N")
        {
            if (CheckWinner() == "D")
                return 0;
            else
                return CheckWinner() == computerSide ? 2 : -1;
        }

        if (isMaximizing)
        {
            int localBestScore = int.MinValue;
            for(int i = 0;i < 9; i++)
            {
                if(values[i] == 0)
                {
                    values[i] = GetPlayerValue(computerSide);
                    int localScore = MiniMax(depth + 1, false);
                    values[i] = 0;
                    localBestScore = Mathf.Max(localScore, localBestScore);
                }
            }
            return localBestScore;
        }
        else
        {
            int localBestScore = int.MaxValue;
            for (int i = 0; i < 9; i++)
            {
                if (values[i] == 0)
                {
                    values[i] = GetPlayerValue(playerSide);
                    int localScore = MiniMax(depth + 1, true);
                    values[i] = 0;
                    localBestScore = Mathf.Min(localScore, localBestScore);
                }
            }
            return localBestScore;
        }
    }
#
 public void Update()
    {
        bestMove = 0;
        score = 0;
        bestScore = int.MinValue;
        if(computerPlays && computerTurn && CheckWinner() == "N")
        {
            for(int i = 0;i < 9; i++)
            {
                if (values[i] == 0)
                {
                    values[i] = GetPlayerValue(computerSide);
                    score = MiniMax(0, false);
                    values[i] = 0;
                    if(score >= bestScore)
                    {
                        bestScore = score;
                        bestMove = i;
                    }
                }
            }
            buttonList[bestMove].text = computerSide;
            buttonList[bestMove].GetComponentInParent<Button>().interactable = false;
            EndTurn();
        }
    }
dense estuary
# gray mural Please, read the messages sent after that one

I got it working. cs var gravity = Physics.gravity; var newGrav = RotateVel(gravity); if (SlopeCheck()) { gravity = gravity / 2; newGrav = newGrav / 2; rb.AddForce(newGrav, ForceMode.Acceleration); Debug.DrawRay(origin, newGrav, Color.blue); } rb.AddForce(gravity, ForceMode.Acceleration); Debug.DrawRay(origin, gravity, Color.blue);

gray mural
#

If you don't want this kind of logic with rotation, consider returning to your previous solution, using either aSphereCast or Ray

#

Just be careful with using radiuses / distances

gray mural
#

Also, probably consider not dividing the gravity values by 2

dense estuary
gray mural
#

Consider using the OnCollisionEnter and OnCollisionExit methods to change the boolean isGrounded to true and false respectively. That's, honestly, the most reliable option.

dense estuary
frail bone
#

Silly question, why's the reason a modifier is changing the prefab and not the actual instance

gray mural
gray mural
#

If you have a reference to a prefab, changing it will, obviously, change the prefab, not a random GameObject somewhere in the scene

frail bone
spring creek
gray mural
frail bone
#

Yes, well, it's supposed to change the UI but the UI is attached to the instance not the prefab so right now it doesn't change anything

dense estuary
gray mural
spring creek
gray mural
#

Me either.

dense estuary
gray mural
gray mural
# dense estuary How so?

Well, if you want your SphereCast to work properly, you will have to find a proper radius and its location.

#

By using the OnCollision methods make your collision be checked by Unity

#

This will almost always be much more accurate

#

Just make sure you check the collision with desired ground GameObjects, which should usually have a Ground tag

frail bone
spring creek
#

Cache that reference being returned

#

var instance = Instantiate(prefab)

copper atlas
#

Hi im trying to resize the children of paisagemRight through script
I tried 2 ways that appear in the 3 and 4 pic and it happens the result in pic 1 does anyone know why those wireframes appear with the resizing and the actual object not?

gray mural
gray mural
tawny elkBOT
frail bone
gray mural
gray mural
gray mural
# copper atlas sure

Please, consider using one of the sites I've previously sent for the large code blocks.

copper atlas
gray mural
frail bone
gray mural
gray mural
#

I cannot really answer a question I don't understand

arctic plume
#

I'm not sure if this is the right channel to ask it in but I wasn't sure which else to use
Is there a way in Unity to develop like a class diagram kinda thing that will generate a graph of how all the different components in your project connect? Like a model-view-controller diagram for Java

knotty sun
spring creek
spring creek
#

Prefabs do not exist in the scene. Maybe that is the confusion?

frail bone
#

then why does it modify the prefab and not the game object

#

it's a ontriggerenter2d

#

the is an issue with that specific line but im not sure how i am supposed to explicitly call the game object

spring creek
#

At least that is what it looks like

#

You cropped off the line numbers, which is super unhelpful

frail bone
#

I did call the script

knotty sun
#

That is irrelvant. Your line 16 is not working as you think

spring creek
#

Is player health on the same object as enmigo?

#

That would be suprising

#

And also, we have now proven this issue has absolutely nothing to do with prefab vs instance. If you had just shared your code to start with, we would have told you that from the beginning
The issue is that you need to look at the docs for GetComponent

frail bone
#

Player health is on the player while enemigo is on the enemy

spring creek
# frail bone No

GetComponent returns a component attached to the SAME object, or null if it doesn't exist

frail bone
#

Ohh

#

Lemme check the documents

frail bone
#

I can just erase that line but the error still stays

ancient canopy
#

Hey guys, i was wondering how you are loading game settings on game startup.
I found this mothod extention which executes the method before splash screen, or other times if wanted.

    private static void LoadAudioSettings()
    {
        AudioMixer masterMixer = Resources.Load<AudioMixer>("Audio/Master");
        if (masterMixer == null) return;
        
       masterMixer.SetFloat("Master", -40f);
    }```

The method does execute, AudioMixer is present.
But the volume is still 0 for the mixer. 
I did execute this method later on by button press and it works like a charm.
Why doen't it set the volume on startup even tho the method gets executed?
Do you use another way to set the player settings on startup?
spring creek
unique delta
latent latch
rugged storm
#

in HSR a turn based rpg similar to what im working on, attack dmg numbers appear with timing during the attack animations That are best practices for storing animations for a move and timing the damage numbers and effects?

latent latch
#

Object pooling

#

Animations should just be cached on your animator

dull quarry
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class menegergry : MonoBehaviour
{
public SoundManager soundManager;

void Start()
{
    DontDestroyOnLoad(gameObject);
}

void Update()
{

}

}

#

public SoundManager soundManager; doesnt work

tawny elkBOT
dull quarry
#

number 7

rigid island
#

bro really sent a screenshot

#

send the link, not screenshots

#

also what is the question here ?

#

like "doesn't work" what does that mean
soundManager does nothing here

dull quarry
#

i got this

#

red line

knotty sun
# dull quarry

ok, so your take away from the bot message was, im just going to ignore it and send a screenshot instead?

rigid island
dull quarry
#

idk object dont have component?

hexed fjord
#

i think its supposed to be AudioManager

rigid island
dull quarry
#

this is gamemeneger

#

in poland menegergry'

knotty sun
#

but you reference a class SoundManager, where does that come from?

dusk apex
#

I'm pretty sure the error says that you do not have anything called Sound Manager

rigid island
#

ill try again
**did you create a class named SoundManager ? **

dull quarry
#

class? name skrypt?

rigid island
knotty sun
#

this is referencing a class called SoundManger, did you create one?

dull quarry
#

ohhh no... I understand now, I thought it was similar to audiosource

#

so a have to do it otherwise

knotty sun
#

I think you need to !learn

tawny elkBOT
#

:teacher: Unity Learn β†—

Over 750 hours of free live and on-demand learning content for all levels of experience!

rigid island
worn crystal
#

is there any performance advantage enabling isTrigger on a non moving object?

#

or is the performance only based on how many other colliders/triggers it needs to compare against in scene?

somber nacelle
#

isTrigger has nothing to do with performance, it makes a collider a trigger volume instead of a solid collider

worn crystal
#

yeah which means that things like rigidbodies cant interact with it

#

so does this save any performance?

worn crystal
#

wait really?

spring creek
#

OnTrigger requires a rigidbody

#

That is an interaction

worn crystal
#

ohhh i meant directly collide

#

but i get what you mean yeah

#

i guess the comparison is still being made so its not factoring it out in any case

spring creek
#

I mean. I would say performance is completely irrelevant

#

If you want them to collide, don't use ontrigger

#

If you don't and still want a physics message, then make it istrigger

worn crystal
#

ill explain my case from the root, i pretty much just have a collider on many objects so that once the player char walks behind it from the camera's POV itll attempt to fade it and make it transparent

spring creek
#

You can disable layer interactions in the matrix too

worn crystal
#

i dont want to have like 200 objects with colliders in scene if possible but was wondering if isTrigger would somehow help lol

gray mural
worn crystal
#

they are on a different physics layer too though so them colliding with something was never an issue

somber nacelle
spring creek
dusk apex
#

I think the collision/trigger detection is the limiting factor here and not the displacement (math).

worn crystal
#

feature, so that once the player goes behind some obstacle the view isnt completely obstructed so i raycast against the collider and grab a script to fade in/out the object

#

and yeah dalphat pretty much, im not concerned about it colliding with anything at all, just purely in terms of which one is more performant (if any), but i guess because theres nothing in scene that will ever collide with these objects the impact would most likely be 0

dusk apex
#

If you're wanting to have multiple objects with colliders in the scene, the more common optimization would be to differentiate between static and dynamic bodies. Other than that, there's going to be some expense relative to the number of physics objects in the scene.

latent latch
#

the best answer you get is profiling it yourself

worn crystal
#

yeah i think it comes down to just profiling tbh, not wrong about that

latent latch
#

Just my experience with filtering out colliders, there is still some cost even if they aren't on the same layer

#

abit minimal at that

worn crystal
#

Got it, I'll have to profile it in that case and see the impact

#

Appreciate all the help!

merry ridge
#

I hate that dictionaries are not serialized

dusk apex
#

Maybe checkout the asset store for free inspector tools else they kind of are if you're referring to json - non unity.

latent latch
#

List of structs with kvp -> Start -> new dict -> foreach struct kvp

merry ridge
rigid island
#

whoever wrote that example code said "Fuck your C# conventions microsoft"

somber tapir
#

I am using a system of ScriptableObjects that hold default values which than get loaded in a MonoBehaviour, but there are some problems with this. Here is an example, maybe someone has a better idea on how to do this:
https://hatebin.com/mrmaiowhni

knotty sun
somber tapir
#

it's explained in the link

hearty python
knotty sun
#

Looks like you need to look into Generics

hearty python
# hearty python

does anyone know how to modify this line of code so that the value gets applied smoothly

#

rather than snapping

#

because lerp only works with float and not with vector3

latent latch
#

lerp * 3

hearty python
#

oh thanks i dindnt know that existed

#

:))

#

should have looked better

latent latch
#

I actually don't know the real issue, but usually if you want to contain the root of the constraint you usually also want to make an interface

somber tapir
#

I need to have a serializable List<AnimalData> somewhere to spawn any Animal.
Using an interface could work, just have to work around that Unity can't serialize interfaces by default.

latent latch
#

right, that's the unfortunate part

#

good code dies with unity

latent latch
mossy snow
#

Animal then becomes an abstract generic class with an abstract CreateCopy method, and each subclass implements it

#

actually why do you have a copy there at all?

toxic prawn
#
            if (hit.collider.TryGetComponent(out PhysicsSurfaceData physicsSurfaceData))
            {
                m_audioSource.PlayOneShot(physicsSurfaceData.GetFootstepSound(force));
                print("step taken");
                //cam.position
            }

how do I add bobbing to this (Im using charactercontroller)?

slim gate
#

So a far as I am aware calling:

Singleton.Instance.PlayerScript;

Is not causing any relevant overhead.

What about:

Singleton.Instance.PlayerScript.gameObject;

Is the .gameObject in the end something where I should probably cache it instead referencing it through the singleton every frame if i need this in update? Or is it insignificant and I can do it like this in update?

knotty sun
#

no, it's just a reference so little to no overhead

slim gate
#

perfect

#

Thanks alot!

latent latch
#

this is like a micro-micro optimization

slim gate
#

yeah, if i can i would like to do it like this to not have to set things up anywhere I need it

#

and cache it in each script where I do

#

Makes it nicer to have it one place

sly comet
#

this is how I have my player object set up. You can only swap skins in the menus. So once the game starts my script only activates one of these models and the rest are inactive until you visit the menu again and can cycle through them (array for both model and matching animator). Is this a hit to performance? Should I do more than deactivate the unused ones?

slim gate
#

why not just switch the spriteRenderer/ model? Not sure if that is a solution in your case

#

I have one Gameobject for the visuals of my character and depending on race etc i just switch a sprite

sly comet
#

idk someone in here showed me this is how they do it.

#

it seems to work great but I have a beefy pc

lean sail
#

Since they're all disabled you really wont have a performance issue but itll be way worse loading many of these compared to if you just had one

slim gate
#

Not sure if what I said would be any significant improvement for performance, I assume it would be better there in some way but I would do it just for having your player more compact and readable

lean sail
#

This also looks like hell to edit if needed.

slim gate
#

yeah exactly

#

Thats what I mean

solar wigeon
#

https://gdl.space/qenaguqiso.cpp
hello i really dont understand the problem with my code basicly if i touch a trigger i should start a timer and the text get enabled for a few sec and then just go to setactiv(false) what can be the problem ?

lean sail
#

Also subtracting by the timescale doesnt make a whole lot of sense, I assume you want deltaTime

solar wigeon
#

ok i will try that

main coral
#
    {
        int playerCount = NetworkManager.Singleton.ConnectedClientsIds.Count;
        int temp;

        do
        {
            temp = UnityEngine.Random.Range(0, playerCount - 1);
        }
        while (m_SpawnPointIndexList.Contains(temp));

        m_SpawnPointIndexList.Add(temp);
        return temp;
    }```

Hey i want for each player a random number bot every number only once. But my game is crashing what is false on this while loop ?
solar wigeon
#

nether does timer becomes false

toxic prawn
#

how do I make everything but one script to just pause without breaking them?

leaden ice
solid slate
toxic prawn
dusk apex
main coral
#

I want a Spawn Vehicle system for my cars for the first round that everyone get a random spawn point. When 8 players are connected I want that everyone get a random number between 0-7 but every number only given once

#

im thinking since days and i dont have a solution. i tried many things ..

solid slate
main coral
#

Trhis should work?

    {
        int temp = UnityEngine.Random.Range(0, m_SpawnPointIndexList.Count);
        m_SpawnPointIndexList.Remove(temp);
        return temp;
    }

    private void CreateStartPositionList()
    {
        int playerCount = NetworkManager.Singleton.ConnectedClientsIds.Count;

        for (int i = 0; i < playerCount; i++)
        {
            m_SpawnPointIndexList.Add(i);
        }
    }```
dusk apex
main coral
#

thanks alot is working!!"

solid slate
lean sail
devout harness
#

Is it possible to create realtime HDRP reflection probes at runtime? I'm noticing they don't budge from baked (the default) when changed from a script- is there some hidden fields I need to configure first?

wicked badge
#

anyone know how to fix this?

#

cause ive been trying to fix it for 30 mins and nothing is workin

hasty haven
#

Is there a way I can get a reference to a scene after loading it additively async?
I'm trying to manage multiple instances of the same scene

rigid island
#

there is scenechanged event, not sure if it works additively though

#

it gives you old scene / new scene

rigid island
#

nice

hasty haven
#

Would this work in the case where many load requests can happen in no particular order?
I want to trigger the load and have the reference in the same coroutine

solid slate
broken nest
rigid island
hasty haven
#

Hmm alright this might take some experimentation

#

I suppose it doesnt really matter what the order is as long as its the correct scene type and a unique instance,
I'll try working with the event since it gets called once after each scene loads

solid slate
dawn nebula
#

So when you select the Rect tool and then a gameobject, you can see these "anchor points" and rescale the object. Is there any way to interact with these anchor points in code?

#

Or helper functions that simulate behaviour?

#

Because really all they're doing is modifying the scale and repositioning the object.

crystal bramble
#

i have a question

leaden ice
#

but the scaling would just be happening via the Transform

mild osprey
#

I have a text system that that types out a message letter by letter and plays a sound every X letters typed. Issue I'm having is that it seems to be framerate dependent and I'm not exactly sure why. I've tried formatting the code in a couple different ways but it still ends up with the same result. Here's the coroutine that handles the logic:
https://hastebin.com/share/niyezoquce.csharp
and an example of the issue is shown below.

indigo verge
#

https://hastebin.com/share/omixidiyis.csharp

Can someone look over this and tell me what they think? I'm working on making an implementation for dynamically changing animation clips on a per-object basis, so I can play animation clips directly from file instead of having to shove them all in a mekanism tree, and dynamically modify animations as needed.

Am I doing this right? This should be creating an instanced override controller for whatever object calls it, which can then be modified without altering the animations of any other object in scene, but I'm new to working with these systems.

sly comet
#

Would anybody that understands how to build a ghost time trials script and how to save/load that data be able to tutor me in voice chat for a bit? I think it would take us a very short amount of time and I have venmo for your troubles. I would appreciate the help. I can figure out the animations and all of that. I already have the scripts functioning. I just need to know how to get them to save/load properly as well as verify it all works. I already have a saveGameManager that works for levelData I just want to get it working for this ghost data now

dense estuary
solid slate
rigid island
#

rewrite it , or Use MoveTowards

dense estuary
#

But I thought this was correct?

rigid island
#

yeah but you're changing the startPos the lerp each frame

#

as you're setting the pos you're changing the startpos of lerp it doesn't know how to act

dense estuary
#

ooh, the same thing I'm doing for changing the color of my radar icons. ```cs

iconImage.color = startColor;
yield return new WaitForSeconds(0.5f);
float time = 0;
float duration = 2f;

while (time < duration)
{
iconImage.color = Color.Lerp(startColor, endColor, time / duration);
time += Time.deltaTime;
yield return null;
}```

#

This is in a coroutine

rigid island
#

note how its start to end, rather than current to end
and the startCol only gets recorded in 1 frame then on the smoothing / over course of frames it stays same for start

sly comet
devout nimbus
#

Anyone have good resources on pathfinding in large open worlds?

dawn nebula
rigid island
dawn nebula
#

Otherwise I guess I just do some math and move the position.

solid slate
devout nimbus
rigid island
devout nimbus
#

Im using the terrain tool, are you able to split the mesh to bake only certain parts of it? I assumed you baked the entire mesh at once @rigid island

dense estuary
rigid island
#

nothing to do with terrain

devout nimbus
#

I kept searching online for ways people set up pathfinding for open worlds so I was just hitting deadends when I shouldve looked into navmeshs specifically and I wouldve found answers much easier

rigid island
#

yeah there are other ways to do this, but they require alot more work and code

#

also you probably wouldn't want to bake realtime for NPCs that are very far away

vague tundra
#

If I have three scenes, MainMenu, Area1 and Area2, and I've added them to the build settings in that order,
When I am editing Area1 and press Play, should I still be able to load other scenes?
Or now that I've added the scenes to the build settings, I must start from the first scene?

cosmic rain
cloud python
#

yeah

keen swift
#

I need a bit of help with something, I made a circular slider for a prefab thingy, and it works fine. it's just i can't get the knob to move with the filling.

keen swift
rigid island
#

can you show what you mean?

severe maple
#
                        if (thomasModel == null)
                        {
                            LoggerInstance.Msg("Loaded Bundle Successfully.");

                            thomasModel = AssetBundle.LoadFromFile("Mods/AssetBundles/thomas");

                            // load thomas once
                            GameObject thomasPrefab = thomasModel.LoadAsset<GameObject>("Thomas the Tank Engine");
                            Vector3 thomasPos = new Vector3(-30488.41f, 489.5023f, 38069.4f);

                            // set thomas's scale
                            thomasPrefab.transform.localScale = new Vector3(20, 20, 20);

                            // set thomas's local position
                            thomasPrefab.transform.localPosition = thomasPos;

                            // test parent
                            thomasPrefab.transform.parent = va01system.transform;

                            // initialize thomas
                            modelInstantiator.LoadModel(thomasPrefab);


                            LoggerInstance.Msg("Thomas Should be waiting for you outside planet Vauldric!");

                            // set loaded to true
                            thomasLoaded = true;

    public static void LoadModel(GameObject model)
    {
        Debug.Log("Object Instantialized!");
        Instantiate(model);
    }

does anyone know why i'm generating 2 objects instead of just one?
im trying to link the prefab as a child but it keeps making a parentless clone, and then an empty child-instance copy that doesnt actually do anything

#

they both seem to have the same data except the child instance just doesnt exist

severe maple
# keen swift

do you mean the blue thing is rotating on the wrong axis?

keen swift
severe maple
#

instead of rotating on the 3d axis

#

from what i can understand?

keen swift
#

Yea basically

#

it's for a cool stamina meter

rigid island
#

which part controls the blue part then

keen swift
#

wdym by that? I assigne the bar to Handle Rec like a normal slider, there's no script to the slider.

severe maple
vague tundra
#

How can I open 2 scenes at once, such that each scene has its own Scene and Hierarchy windows/tabs?

somber nacelle
#

pretty sure the answer to that is "you don't"
also not a code question

vague tundra
somber nacelle
#

why bother asking a question if you don't want a response to it?

spring creek
#

No one else has a better response than that

#

Two scenes loaded at once share a hierarchy

#

I dunno about the scene window, I guess some custom editor code might be able to do it. But I've never seen it

vague tundra
somber nacelle
#

lmao what the fuck. just block me if you don't want to see responses from me?

spring creek
vague tundra
somber nacelle
#

yeah not my problem. good luck with whatever the hell it is you're doing though πŸ€·β€β™‚οΈ

spring creek
#

Well, I will also never be answering your questions either.
This is absolutely ridiculous. What a jerk

sick flint
#
        if(clampedY == 1)
        {
            direction = FacingDirection.Up;
        }
        else if(clampedY == -1)
        {
            direction = FacingDirection.Down;
        }
        else if(clampedX == 1)
        {
            direction = FacingDirection.Right;
        }
        else if(clampedX == -1)
        {
            direction = FacingDirection.Left;
        }
        
        if(prevDirection != direction)
        {
            yield break;
        }``` I have a coroutine and it is to move the player. If I have this logic in the code, It for some reason runs twice. Why would that be?
lean sail
sick flint
#

It was too long of code to send in discord so thats why I didnt, but let me try to get it.

#
    {
        var clampedX = Mathf.Clamp(moveVec.x, -1f, 1f);
        var clampedY = Mathf.Clamp(moveVec.y, -1f, 1f);

        animator.moveX = clampedX;
        animator.moveZ = clampedY;
        
        var targetPos = transform.position;
        targetPos.x -= moveVec.x;
        targetPos.z -= moveVec.y;

        var ledge = CheckForLedge(targetPos);
        if (ledge != null)
        {
            if (ledge.TryToJump(this, moveVec))
                yield break;
        }

        if (checkCollisions && !isPathClear(targetPos))
            yield break;
        var oneWay = CheckForOneWay(targetPos);
        if(oneWay != null)
        {
            if(!oneWay.TryToMove(this, moveVec))
            {
                yield break;
            }
        }
        var stairs = CheckStairs(targetPos);
        if(stairs != null)
        {
            if(stairs.UpDirection == new Vector3(moveVec.x,0, moveVec.y))
            {
                targetPos.y += .5f;
            }
            if(stairs.DownDirection == new Vector3(moveVec.x,0, moveVec.y))
            {
                targetPos.y -= .5f;
            }
        }
        
        isMoving = true;

        
        

        while ((targetPos - transform.position).sqrMagnitude > Mathf.Epsilon)
        {
            transform.position = Vector3.MoveTowards(transform.position, targetPos, moveSpeed * Time.deltaTime);
            yield return null;
        }
        transform.position = targetPos;

        isMoving = false;

        OnMoveOver?.Invoke();
    }```
lean sail
tawny elkBOT
lean sail
#

If some specific logic that's not in a loop is done twice, you're probably starting the coroutine twice. Adding some basic debug logs should prove to you if this is the case

sick flint
#

I know the coroutine is being called twice. I have used some debug logs but I just cant figure it out. This handle update function is called from a statemachine update

#
        if(clampedY == 1)
        {
            direction = FacingDirection.Up;
        }
        else if(clampedY == -1)
        {
            direction = FacingDirection.Down;
        }
        else if(clampedX == 1)
        {
            direction = FacingDirection.Right;
        }
        else if(clampedX == -1)
        {
            direction = FacingDirection.Left;
        }
        
        if(prevDirection != direction)
        {
            yield break;
        }``` It is only being called twice when I have this in my code.
lean sail
#

Probably some faulty logic with setting that character.isMoving because that's what would be stopping that coroutine from being called multiple times

sick flint
#

Okay I can look into that. Thank you.

somber nacelle
sick flint
#

Yes that is my goal. I want to emulate movement such as pokemon soul silver where you're only allowed to move in the direction you are facing but if you decide to turn a different way the character just turns.

hidden oxide
#

Hi! I’m really new to unity/fungus and I’m having a coding issue- could I get some help on it? πŸ₯²

somber nacelle
lean sail
hidden oxide
spring creek
sick flint
hidden oxide
#

I got the error [00:21:19] Assets/Fungus/Scripts/Editor/ViewEditor.cs(140,99): error CS1501: No overload for method β€˜FreeMoveHandle’ takes 4 arguments

#

I’m gonna copy and paste my script in here just gimme a sec

spring creek
#

You passed 4 things, and apparantly it doesn't take 4 things

hidden oxide
#

Ok lemme send u the script and u can tell me what to edit

spring creek
hidden oxide
lean sail
spring creek
hidden oxide
#

Ok

sick flint
spring creek
hidden oxide
spring creek
#

Remember to not ask to ask. Just go for it

hidden oxide
#

I joined the server 5 minutes ago, I wasn’t going to understand the rules right away.

spring creek
#

That is why the website I linked to has nothing to do with unity or this server

#

It is how you should approach all internet communications in forums/servers

cosmic rain
#

Basically, get to the point. No one knows if they would be able to help you before you actually ask the question.

subtle basin
#

I use the Enemy class and WireEnemy inherited from it to control the movement of enemies. During the game, wire enemies can change to an ordinary one, so how can I change type of them to the Enemy type so that all the fields remain the same and the links are relevant?

subtle basin
leaden ice
#

This doesn't really sound like a use case for inheritance

subtle basin
leaden ice
#

A state machine?

#

If the only thing different is how hey move... A bool?

#

if statement?

west lotus
#

Composition enemy movement is its own component and you can swap it out with what ever you like

molten crypt
#
Argument 1: cannot convert from 'Interactable' to 'string'CS1503

How do i convert it to a string?

cosmic rain
molten crypt
#

Im using it as a Class but i need to switch to a string once its done

#

right now its a Interactable currentInteractable;

#

but i need to convert to a string later on

quartz folio
#

what does that even mean, what is an Interactable and what would it look like as a string

molten crypt
#

cause if i switch it too public string currentInteractable
i get a bigger error

molten crypt
fervent furnace
#

define a sting path property on your Interactable class/struct/whatever

#

or just clone it if possible

lean sail
#

you can just directly reference the prefab from inspector, instead of using resources here

#

this will use resources.load every single time you want to instantiate an interactable

woeful narwhal
#

so I have a unity timeline and i want the last animation played on the timeline to keep on repeating, how would i do that? thanks

rough tartan
#

why this part of my script works with one client, but not several? If a client sends the ID 123, the game 123 is created and if this same client sends back the ID 123 the server tells it that the game already exists, on the other hand if another client sends 123 after the first client has sent these 2 messages, the server creates a game instead of saying that it already exists, and in all cases the server returns the correct gameID.

public class Lobby : WebSocketBehavior
{
    public Dictionary<string, Game> GameDict = new Dictionary<string, Game>();
    protected override void OnOpen()
    {
        Console.WriteLine("New Connection");
        Sessions.SendTo("Welcome To NDS", ID.ToString());
    }

    protected override void OnMessage(MessageEventArgs e)
    {
        Console.WriteLine(ID);

        Sessions.SendTo("reΓ§u 5 sur 5", ID.ToString());

        
        Console.WriteLine($"{e.Data}");
        

        if (e.Data.StartsWith("ID"))
        {
            Console.WriteLine("Player searching Γ  game...");
            
            int Index1 = e.Data.IndexOf('D');
            
            string GameID = e.Data.Substring(Index1 + 1, e.Data.Length - 2);
            
            Console.WriteLine(GameID);
            
            if (GameDict.ContainsKey(GameID))
            {
                Console.WriteLine("the game already exist");
            }
            else
            {
                GameDict[GameID] = new Game();
                Console.WriteLine("the game has been created");
                Console.WriteLine(GameDict[GameID]);
            }
        }
    }
}
knotty sun
#

In fact your Dictionary should probably be a ConcurrentDictionary anyway

rough tartan
toxic prawn
#

how do I pause everything except some scripts and sounds to make it look like game crashed?

molten crypt
#
    public void AddToInventory(Interactable currentInteractable)
    {
        whatSlotToEquip = FindNextEmptySlot();
        itemToAdd = Instantiate(Resources.Load<GameObject>(currentInteractable), whatSlotToEquip.transform.position, whatSlotToEquip.transform.rotation);
        itemToAdd.transform.SetParent(whatSlotToEquip.transform);
        itemList.Add(currentInteractable);
    }
Argument 1: cannot convert from 'Interactable' to 'string'

I dont get how to fix this i looked at the error forms etc

#
    public Interactable currentInteractable;
    void Update()
    {
        CheckInteraction();
        if (Input.GetKeyDown(KeyCode.F) && currentInteractable != null)
        {
            if(!OpenInventory.Instance.CheckIfFull())
            {
            OpenInventory.Instance.AddToInventory(currentInteractable);
            currentInteractable.Interact();
            }
            else
            {
                Debug.Log("inv is fulll");
            }
        }
    }

the Interactable script

knotty sun
molten crypt
#

wym?

#

the prefab of the object i want to pickup?

knotty sun
#

exactly what I said. Go and have a look at the GameObject documentation

fervent furnace
#

.load requires a string path, and you pass a instance of your class to it

lean sail
molten crypt
knotty sun
molten crypt
#

I had the right one. Just wanted to make sure

molten crypt
knotty sun
#

not yet, no

molten crypt
#

Why not? if the GameObject is not useful in a load do i even need load at all

knotty sun
#

for Resources.Load you need a string, as you know, what I am trying to teach you is how to get that string

molten crypt
#

So i need to get the GameObject as a string

knotty sun
#

you need to get your object (currentInteractable) as a string and the Object documentation tells you exactly how

molten crypt
#

.ToString()

quartz folio
knotty sun
#

exactly. and ToString() return name so .name also works

wide mist
#

so when will unity finaly do smth that unreal does make our lifes easier ?

liek motion matching .. for example ? to get rid of that ridicolous state machines ? πŸ˜„

#

unity devs should take a look at latest news from unreal 5.4 thats jsut fck insane ..

quartz folio
wide mist
#

oh did they

#

is there a video i can see about it ?

wide mist
#

well any ideas if they will resume it ?

#

after dots ?

quartz folio
#

🀷

wide mist
#

i hope it wont take 10 years

#

well probably wont

#

than

quartz folio
#

I presume they'll resume it when they remake the animation system

wide mist
#

well they should

#

animation system is pretty mutch outdated

#

automatic rig creation also a sweet thing wiht premade limbs n shit

quartz folio
#

Sadly we'll have to wait for Unity 7 before anything happens, but I imagine it'll be a large refresh with the .NET upgrade. A chance to change the engine properly

wide mist
#

well thats about in 2026 minimum

#

i recon

west lotus
#

Kinematica is pretty much dead, the original devs are no longer at unity and unity has no interest in maintaining it or further developing it

quartz folio
#

I realise this whole convo is irrelevant to this channel

west lotus
#

It is πŸ˜ƒ

molten crypt
# knotty sun exactly. and ToString() return name so .name also works

So i did

Instantiate(Resources.Load(GameObject.ToString(currentInteractable))

And then i get
No overload for method 'ToString' takes 1 argumentsCS1501
I didnt see it on the Docs so i tried to search and i saw the '?' for null
but when i tried

Instantiate(Resources.Load(GameObject?.ToString(currentInteractable) ??)

It still didnt work
So idk if i didnt it right or what

quartz folio
#

Everything you're writing is complete nonsense

molten crypt
#

probably is ngl, im new

quartz folio