#💻┃code-beginner
1 messages · Page 417 of 1
best option imo even tho i don't use CLI i wish i could
did you see the video i sent ?
you don't need any addons
just use a git client, github desktop works fine but others are good to. just showing the process real quick
yes, I went through it, I know Github Desktop exists, I choose not to use it, I'm going to use a Git Client
also why "choose not to use it"
Github desktop is a client...
CLI > GUI imo (except for looking at prior version history, but that's more that I'm not very good with the CLI)
Set up git (git init the folder) then download some gui, it does not matter at all which
Oof
Then you are done
yeah because typing is faster than clicking a few buttons, if that works for you though more power to ya
You set up the folder, use the cli. Done
ok, what is a git client?
an app which communicates with the repository
and the git thingy you put into the path is NOT a git client
Github desktop and others
Git thingy?
wdym the "git thingy"
the .gitignore or ?
anyway if you decide to use GIT and set it up without a GUI for whatever reason
the very least yyou need https://github.com/github/gitignore/blob/main/Unity.gitignore in your folder
yes that is the client
What you download, from here
ok, so I will use the Git CLI Client. Is this the correct terminology?
correct
If you really want it easy use the github client, brings git bundled and you can directly manage your repositories, if you really want to learn it i suggest using the command line
you mean github desktop client ? it was suggested
yeah, oh sorry didnt see that, shouldve read further back
they said CLI > GUI 🤷♂️
for me its easier with gui to make a push while im eating pizza with my other hand 🍕
how dare you eat pizza whilst developing, shame on you
Only mountain dew and cheetos permitted
my battery cells are only fueled by pizza 🤖
NO food or drink allowed in the computer room, it's a controlled environment
you code in one of those Cleanroom ?
of course, you mean you don't
My office is like a NASA clean room
my cat alone puts furr in keyboard
my computer wont operate correctly w/o 3 lb of dust circulating around teh case
tell me about it, my clean room is shared with 4 dogs
yeah but I know git
also I feel like an epic programmer with epic skills when using the cli
(should start using neovim too)
2 cats here, i think i pulled 4 whole cats out of my pc last time i cleaned it
try setting up a unity game on a linux server, you will have all the epicness you want with CLI and vim
fr.. linux calling ur name
One of these days I shall put my mind to inventing the perfect anti-dog/cat hair computer ventilation system. I will be rich(er)
any idea why toggling a bool on one of these changes it for all the others?
what could i have messed up here
you are most likely toggling it on the prefab, not the instance
there is no prefab
Any scripts running on there?
well, would u care to share the code? or are we gonna play guessing games
!code
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
so whats wrong with it?
toggling the "friendly" variable toggles it for all of the objects instead of just one
same with the other rvalues it seems
wait
OMG
forloops say what?
ouch.. lol
u caught that suprisingly fast tho..
thank god
how i disable repeats "aaa".replace("aa", "a") gives aa not a
I'm afraid you're going to have to use... Regex
logic
"aaa".replace("aaa", "aa") .replace("aa", "a")
And now we see more cracks of a string based system forming
well i thought of that
so wtf ask then
because if character repeats 20 times it will require many replaces
Regex
Complete refactor 😸
string processing is ALWAYS going to be slow, learn to do it correctly, not at all or suffer the hit
never
actually maybe if I do hca and get a laptop that I have to install linux on, but not
you know you can install linux on any laptop even if you don't have to
(Bump)
how to download C# in extensions when i search c# it doest appear
for what IDE/
another tpye of c# appears not the same as this
Visual Studio 2022
I don't think Visual Studio has extensions
There's modules, but that doesn't appear to be one
No one is angry
Incorrect
Is this on mac?
window 10
Ok, go into tools, not extensions
Where are you seeing that you need to install any extensions on Visual Studio?
then
c# isnt in an extension.. its a in the tools / workloads
You want the workloads as digi said
it is important to install C# language into it
get tools
Or whatever it says
now
Yes, but this isn't where you do that. So what is telling you to go here
Well duh, but extensions is not how you do that
!ide shows how to get all you need for VS
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
I just said.
get tools
C# included in the Game Devlepment with Unity workload
how to
wait leme show you
The literal option that says "get tools" in your screenshot
Click it....
already
And what else did you get?
then you already have c#
bro it is already installed
how to check
What ELSE did you install?
Read the guide
this guy have another?
This is literally an entirely different program
That is vs code
yep it appears when i open the script
what then what i have
Visual studio
you have visual studio u said
bro what the hel!
😢
leme download it
how to downlaod it properly guide me what to download and etc
ide=?
theres already a guide its been linked over and over
ok
I did everything listed there. Maybe I just need to enable something? What I’m specifically not seeing is autofill for many things. For example when I type “SerializeField” it doesn’t autofill.
!ide
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
the vscode one.. if u want to use vscode
they say install via unity hub and mannualy on studio
then vs code
then jetbrains rider's brain
u dont need studio && code
then other/none
u only need one or the other
Why? It is worse
nah idk but ... eeeee
i should download it how much gb ?
my wifi speedi 20MB but i got 200-500kbs on my pc
You can google all of this
Just go google it and stop spamming the chat
So did you install VS manually or through the hub
If you have trouble AFTER googling it, we can help
sure, i will come back with another problem as always.
Wait….if I’m only using the blue one here is that a potential issue for autofill?
Maybe. VS code is finnicky
It is getting more stable though
you need a bit more extensions to get good autofill
(Sorry in advance if this is in the wrong spot).. Why might my trail renderers for my planet objects (and moons since ya know...same functions there in another script) be behaving as shown in the picture when the scene loads? Code for the trail renderer initialization/control attached.
https://paste.myst.rs/btzxh445
https://paste.myst.rs/ztflnwln
a powerful website for storing and sharing text and code snippets. completely free and open source.
a powerful website for storing and sharing text and code snippets. completely free and open source.
heres the ones i use.. u can ignore codieum, c++, and platformio
Thank you. I saw someone had autofill when they were writing “SerializeField” and figured I must be missing something.
Do you advise using all of those?
(Besides the ones you said to ignore)
Unity Code Snippets is the most important
Thanks sm!
its hard to know which one does which. b/c codieum is an AI tool.. and it helps fill in almost everything
Is this the best channel to ask for help with figuring out why a small program isn’t working in some way?
If it's related to code, yes
I think it's an issue with position of the parent transform on load but I'm not sure. :/
Okay. Yesterday I posted a message here with code I needed help with. I’ll grab the link to the message.
Essentially the issue is that it wasn’t visually changing the Scene at all once uploaded. Not sure if I needed to press Play or what. Idk why it doesn’t change anything.
This is the code that I was thinking would change my Scene to include an array of several rectangular “rooms:”
Didn’t have any compiler error messages.
My question: Why might this code not change anything in my Scene?
Or just, in general, could something prevent a scene from updating?
which?
Mark Done
Mark Done
The button that says Mark Done
without sleecitng
blue text usually indicates a link
bruh what is this?
it says "i am in your pc"
is that vs code? i downloaded cracked apk of vs code
wtf is that lol
apk version of vscode?
Why would you download a cracked apk?
is it paid
Looks like a virus. Good work
who are you
alright
@glass aurora Enough spamming this discord with your nonsense. You've been at this for days.
format your harddrive and call it a day
okay and sorry
this isn't a PC support channel
bro how i let my Script open on Vs code it's opening on STUDIO!
you have to configure Unity
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
in preference then select that right
Like six times now
Why the fuck would you download a cracked version of a free program in a format it's never been released in
if you cannot read the instructions in the vscode link, you should perhaps consider another hobby
no bro its safe i guess that was a prank
Because they're a troll
You know I'm beginning to understand why you said "everyone was mad at you" and it's not because you're a beginner
Realized I forgot to include a potentially important bit of code for my problem. Also.. this probably got buried under the spam. lol
I am mad at them now
Like jfc, stop lol
nah def not because of beginner, many beginners come here and get help no problem.
Fair
language issue because sometimes i cant understand english
I just interacted with them 5 mins and already I'm mad lol
No, not a language issue. A maturity issue. Grow up
no showing willingness to put your own work goes a long way
it is i cant understand any interface
Then why isn't your system in your native language
You seem to understand us just fine, but not when it's on your PC, which you can change the language of
yet you type well beyond what app words mean..
Well i am matured making games at 15 is not a normal thing
when you are asking questions that can be easy to google answers for that shows lack of care of responsibility for self improvement
no offsense but there are 14 years that come here for help and show more maturity so idk what you're on
It kinda is pretty normal. But for 15 you act pretty young. Stop trolling or risk being banned.
If you have an actual question THAT YOU RESEARCHED THOROUGHLY FIRST, then come back. Please not before then
well i dont wanna waste my time here in a useless debate you both grow up first. You Both are Exper at dev but still blaming ppls.
Sure.
Broseph you faked a ransomware attack in the middle of people answering your questions for no reason
Anger is kind of the expected reaction to wasting people's time with asinine bullshit
!mute 1126119936369102958 3d You can return if you are going to actually be productive.
_notfurry_ was muted.
do navmesh agents work like obstacles? as in 2 agents cant walk through eachother?
they avoid each yes RVO is built in
which can be annoying sometimes they get stuck in tight hallways
it looks like they still push eachother though
im trying to think of a way to prevent that but idk how
You have to try varying the priorty of their agents
rebaking the navmesh at runtime over and over would be very inefficient too
ah i see
so as i spawn them in i should assign an increasing priority
put them all into a list and do it that way?
rip
which version are you on?
exactly what u need to do.. or reset layouts
2022.3.10f1 because thats what we were using at uni
you are many patches behind
i know
but i think its still better to use the same version just so everything works the same
you should take initiative and write a strongly worded letter to whom-ever it concerns
and let them know to update 😈
updating to newer patches wont change how anything functions
idk why so many schools use old af versions
i seen a guy the other day using a versions before dark mode
then whats the point of patches
its not on purpose, just that updating it for a network of like 300 computers would be a pain i imagine
maybe you're think a whole version upgrade. which *might * be tricky for *specific * assets
unless its really needed they wont bother
that is a damn silly version 2022.3 was not stable before .11 and .21 and above are much better
yeah it feels like it lol
looks at hub real quick
phew... 😅
i mean aside from some errors that dont mean anything that you can disregard it doesnt really break anything
aside from the necessary occasional restart
yea, if ur fine restarting time to time.. no worries
and, of course, the perennial UnityEditor bugs which keep springing up
part of the lifestyle as i see it now 🤣
thats what you get when you expect game devs to do app dev
Im getting a weird issue where the plant that is not picked up yet by the player is having origin issues or something around the player once it is placed on the cart. I will send scripts ina sec
All the plants, the tray, and even the cart have the same exact script on them to pickup. Im not sure if its a parenting issue or not
hmm setting a different priority didnt fix the pushing issue
im guessing the avoidance is in regards to obstacles?
it doesnt seem to work on the agents themselves
hey how can i get the tag of the object hit by my raycast?
RaycastHit provides collider and transform, both of which have a tag property (since both inherit from Component)
https://docs.unity3d.com/ScriptReference/RaycastHit.html
like this? if (objHit = true && raycastHit.transform.CompareTag("Grabbable"))
Yeah that works.
ty
one question, why can you access the tag from the transform??
So the inheritance chain of transform (starting in Unity) is:
UnityEngine.Object > Component > Transform
Every component is on a gameobject, and every gameobject has a tag. So they just added the tag property to the Component class to make things easier.
oh ok. ty
1, use CompareTag
2, add a debug BEFORE the if statement to see if OnCollision is even being called
3, uncrop the image of the tag. What is it on? Show the whole inspector
Debug.Log($"is collision being called{}")what do i put in the brackets?
ok
i minimised everything , if you need details on individual components ill send that too
This is a syntax error.
debug.log("is collision being called")
Just do this
But it is the dollar sign for string interpolation
$
what
in th void but before the if just use debug.Log("Colission") this should get written in the console
i meant the dollar sign*
Got it, but you do not need it.
You could write this though
debug.log($"is collision being called. Hit: {collision.collider}")
components that listen to events...
register and unregister on enable/disable?
vs
stay always registered and just exit early if the component is not active?
👀
Show the rigidbody and collider expanded
second
not even called somehow even though the bodies to act like they collided, the physics work
yes
You need OnCollisionEnter2D
OnCollisionEnter is for 3D
i want to make a 3d game but tahts for later rn just familiarising myself with the engine and the language
shoulda guessed
3d is not any harder really. They are about the same difficulty (or 2d is more difficult in some ways haha. I struggle with it more due to having more experience in 3d than 2d)
are you-
ah
i tried gadot before this
mess
absolute mess of an engine
btw, excuse me?
the 3rd dimension is the final frontier, my dream game is on it but id like to start simpler
Collision2D is the parameter
2d in unity is already 3d behind the scenes.
any way to invert the selectable options firection in the editor?
instead of 2.5D its 3D-(0.5)
I would not call Godot a mess really. It is quite good. I list it third in my favorite engines. Bevy and Unity battle for 1.
people joke the original doom is 2.5D
since its techincally 2d with illusions to make it 3d
unity is reverse
its 3d and its 2d but with illusions
Ok, I get that. Makes sense
how can i make it NOT collide with something with a specific tag?
another IF within the void?
what do i put in the if block?
There is a collision matrix, but it works with layers, not tags
Could that work?
i need it to not collide with the player
but i need the player to still have a collison lol
Ok, put the player in a Player layer and disable collisions between those specific layers in the collision matrix
Tags are only relevant after the collision has already occurred
aha
where do i disable them
is it in the inspector or is it codable?
wait i found
layers okay
what is the player layer?
Matrix is in Edit > Project Settings > Physics (and be sure to go to the 2d section)
Something you make
It is not there by default
ah
how do i add a layer? it just lets me take care of the existing layers
if they should be disabled
or enabled
There should be an "add layer" option at the bottom of the layer dropdown
Otherwise, Edit > Project Settings > Tags and Layers > Layers
it was the second one
okay i can make a new layer how do i connect it to the player=
also in the inspector
found it
ok thanks man
I have my enemy with a navmeshagent and its hitbox is slightly to the right. Is there a way to move it?
Make sure your tool handle position in the scene view is set to Pivot not Center
I think it's more likely your mesh is the thing that is not positioned properly
gameObject.activeSelf checks if the gameobject is active right?
because mine doesnt seem to work
Are you using that in update?
Yes
Because if it is inactive, update is not called
.. oh
So that line will not run then
Oh right
Lmao thanks
okay, thanks.
i know why the properties in animation editor turned yellow. cause in the docs of SetCurve instead of position.x its localPosition.x, idk why it works this way but it does work
pls help me i have no idea how i can fix this mess. somehow my grab and throw script resets the force applied to my projectile in other scripts and i get nullreferenceExceptions on a few lines if i try to drop for example https://gdl.space/opupexoqan.cs (script used for grabbing and throwing) https://gdl.space/atetotumun.cpp (script used to shoot my projectile)
also my object doesnt move when i try to grab it
What line is throwing the null reference exception
wait
35
i think in the drop "section" too but it doesnt show bc i cant even grab it
if (objHit = true && raycastHit.transform.CompareTag("Grabbable"))?
You aren't checking if you actually hit something there
You're setting objHit to true
== ftw
oh.
ok thats it?
ok thank you need to refresh my coding skills havent made something since half a year
for bools i tend to not even use one.. just if(myBool){ }
yeah ik but i want to use this in other projects thats why i have so many comments and made my code as readable as possible haha im a bit stupid sometimes
Sorry, should have caught that earlier. I was focused on the second part
#💻┃code-beginner message
no worries.. cs // comments are king
ohhh bro.. 🫣
😈 😅 ❤️
if it weren't for comments on my own code id lose my mind
especially after returning to a script i havent worked in a while.. "wtf was i doing here"
bro trapped me XDD
im big into <summary> now
/// <summary>
/// Get a direction vector corresponding to the specified cardinal direction.
/// </summary>
/// <param name="direction">The cardinal direction.</param>
/// <returns>A vector representing the specified direction.</returns>
public static Vector3 GetDirection(Direction direction)```
haha thats exactly what i mean. im trying to build a small library of assets i can use in a few projects (grab&drop system, playermovement, cameramovement, a few shaders...)
yo whats thattt
i do the same
it makes these when u hover a function
damn bro how did you learn this power where can i learn this mighty weapons please tell me
u can basically comment every section of ur function
its basically simple.. u can see in my examples how they work
cool thanks but how did you know this even existed? do you just read random articles/discussions?
/// your stuff
/// </summary>``` and so on.. w/ param and return parts [#💻┃code-beginner message](/guild/489222168727519232/channel/497874004401586176/)
unity uses em for their functions..
i just found out how
oh ok
you gotta use descriptive names and descriptive comments 😄
they just happen to be redundant
if u miss one you'll notice the other
theres also [Tooltip("Describe this variable in the inspector")] public float weirdFloat;
ok i dont get any nullReferenceExceptions anymore but my drop function doesnt even get called (no debug.Log) and my grabAndThrow scripts still resets the force applied in toher scripts :(
in austria we say: "doppelt hält besser" (basicly better safe than sry)
exactly.. when coding thats a super fitting phrase
yeah i have no idea if i grab it the object isnt null anymore so it should switch to the else idk what happened
when ur project corrupts.. have a backup
right.. so if ur object isnt null it got assigned? if ur not sure debug that too.. if that parts running.. why isn't the debug part running
i actually havent looked at ur script.. im just thinking basic debugging steps in a general sense
haha im working on a laptop from 2014 and have 44gb free and im using every bite of it and if it dies i would die too.
use version control
github for example
whats ur code look like now.. i think u need to share it for anyone to help diagnose why the no debug log etc
no my if statement checks if the object is null, if it is, it grabs it. than its not null anymore so if i press e again it switches to the else case
!code paste it into a bin website so its referenceable
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
i used gdl.space a few mins before theres the exact code (except for the == instead of the =)
ok so it hasnt changed any? cool
#💻┃code-beginner message here it is btw
which part are u working on?
idk im running my code and testing why theres no debug log in the console :(
why doesnt it switch to my else on line 41 im boutta cry fr
debug this function
put a debug in the first if and the second if
Grab() must not be running somewhere..
i bet the 2nd if never gets true
i have a debug in my grab function so it comes to the second if means the first one gets called to. but also i can grab multiple object(i get multiple debugs) so i think it just doesnt get not null idk why
i think im onto something
i set my item to null when i look away..
the other part of it uses E to interact.. and it checks if theres a cachedInteractable.. and then interacts w/ it
ok i have absolutely no idea what you mean haha
no worries.. i thought maybe seeing how my chain of if elses might help u a little
u cast a ray when u press E
i cast a ray non-stop.. and then the If(pressedE) part is seperate..
if theres an interactable i cached i do something... if theres not i ignore the keypress
(raycast still casting)
I haven't been following this conversation at all, but a couple things that really stand out me in this code:
- Nowhere in the code is
objectGrabbableever assigned a value. It will never be anything butnull. Grab(objectGrabPointTransform)just assigns theobjectGrabPointTransformfield to it's current value, which seems strange.
btw this is the tutorial i used as a foundation bc i had no idea of raycasts and whatever. https://youtu.be/2IhzPTS4av4?si=Qqkl2sKdIcTSKOVb. but i dont like his coding style its so unreadable with is
//blablabla
}```
these if chains can get insanely confusing very fast
🎮Get the Synty Shops pack https://cmonkey.co/synty_shops_pickupdrop
✅Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=2IhzPTS4av4
🌍Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
👇 Click on Show More
🎮 Get my Steam Games https://unitycod...
ok that makes sense
long if-else chains mean ur coding is getting subpar
switch statements are cool
look at his code im just following. thats why i customized it😭
yeah ik but i forget how the syntax works all the time so i just use if
very good observations lol
well when u go back and refactor to clean things up thats when ull know when to use em.. and learn a bit about em
code-monkey can get intimidating for a beginner
i personally think he codes messy and complicated
but i dont want to rn😔
thats fine.. just bringing them up..
are you guys talking about C# or is switch statements another language?
THATS WHAT I MEAN HIS CODE LOOKS WORSE THAN MY ROOM
ya c# switch statements
woah cool. I've never heard of them
using UnityEngine;
using System.Collections;
public class ConversationScript : MonoBehaviour
{
public int intelligence = 5;
void Greet()
{
switch (intelligence)
{
case 5:
print ("Why hello there good sir! Let me teach you about Trigonometry!");
break;
case 4:
print ("Hello and good day!");
break;
case 3:
print ("Whadya want?");
break;
case 2:
print ("Grog SMASH!");
break;
case 1:
print ("Ulg, glib, Pblblblblb");
break;
default:
print ("Incorrect intelligence level.");
break;
}
}
}```
i dont have the time to clean my code its for a game jam and i just have this week to finish my game bc of holidays :(
this looks so delicous
they're great for going thru Enums
me reading through your prints lol
btw is there a difference between print and debug.log??
yes debug.log can take in a 2nd parameter
oh ok
u can send the reference to it
so u can double click it and see what sent the message etc
"Ulg, glib, Pblblblblb"
Im wanted to make something happen when only colliding with a certain object it says I need to define the tag
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.collider.CompareTag("Bullet"))
{
takeDamage(1);
}
}
ok we know my objectGrabbable value is null at all time how can i fix this mess i hate this pls help me
Do you have a tag "Bullet" on any objects?
No i dont... How do i make a tag
click on untagged and add tag.
dont forget it is not set to the object automaticly after creating the tag
Hey, I'm new to unity and I'm just now learning programming so I'm going through the tutorial. But on section of the tutorial where I add the movement script I keep getting this message, Can anyone help?
Thank you it fixed it so when using a string I need to make a tag for it?
When checking a tag, the tag must exist, yes
Okay thanks
Add the reference again to the inspector of your object. Major changes to the script can have it be identified as something else, breaking references - for example, changing the name of the script.
why are my particles invisible when i change the color of the material
This is the beginner coding channel, maybe ask in #✨┃vfx-and-particles or #💻┃unity-talk
Okay I'll try this
initialRoom.GetComponent<Room>().roomIndex = roomIndex;
For the aboveline of code I'm getting the following error:
wait it won't let me copy the error...
Thought I could just right click in the console and click copy but right clicking isn't opening that
I'm guessing a null reference exception error or unassigned reference exception error
'Room' does not contain a definition for roomIndex' and no accessible extension method 'roomIndex' accepting a first argument of type 'Room' could be found (are you missing a using directive or an assembly reference?)
Make sure to have your !ide configured
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
and what dont you understand about that?
You should not have been allowed to type .roomIndex
Intellisense should have underlined it or not auto complete it.
I've followed those steps, still isn't allowing autofill for some things. It's not underlined. I did notice that Room (and other Objects) are all the same color as variable names. Currently using the blue Visual Stuido application and not the purple one. I know the purple one has more features so maybe I just need to swap for that one
This worked thanks 🫡
would this be a place i could ask for help about my game not building and throwing a error
quite a lot tbh. Are they just saying that the Room object does not have roomIndex as an acceptable attribute?
It's been about 4 to 6 years since I've been into coding so I'm pretty rusty
It's saying that whatever Room is (assuming you don't have other errors prior) doesn't have anything called room index.
no ,it is saying that the Room class does not have a roomIndex variable or method that you can access from the script you are on
Possible reasons may be:
- Room doesn't have anything called
roomIndexand that this was a bad/dirty port (copy/paste) - Room is referring to something other than what you think it is (auto import of an incorrect name space with something other called Room)
- There is no Room and the error is a false positive due to us neglecting an error about directives prior to this error
@rocky canyon I DID IT! i just swapped the objectGrabbable value which is always null with a bool which is et to true if i grab something and to false if i drop something. the grab function just gets called if the bool is false else it switches to my else containing the drop function it finally works im so happy right now omg
it looks like
initialRoom.GetComponent<Room>().roomIndex = roomIndex;
Should have been written
initialRoom.GetComponent<Room>().RoomIndex = roomIndex;
(with capital RoomIndex.)
not sure why it needs to be capitalized. Must just be the wat C# works with classes ig
Make sure to configure your ide to prevent simple errors like these.
I need to review the difference between classes and objects. It's been wayyyy too long
A class is a piece of paper that says how an object should do things. The object is that actual thing that exists
It would be because your Room class has a member named RoomIndex and not roomIndex... C# won't demand specific casing for your identifiers, nor change it behind your back 😉
in my example which one is the object? I thought it was Room but ig Room is a class...
I needs to be capitalized because C# is case sensitive and YOU declared the variable with the capital R
It's necessary to acquire help on this server @thorn lake
The class is the literal script file in the assets. An object is an instance of the class
How does one configure it to catch those types of errors? I thought I already had it configured because I did everything listed in the "!ide" instructions
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
ah okay, that makes sense now, thank you sm!
oh wait
it looks like my IDE did catch that originally
I had gone back and changed it to a lowercase thinking it was an error earlier
not realizing that it was not an error
What confused me was seeing roomIndex as lowercase in my input parameters for the function and then uppercase later in initialRoom.GetComponent<Room>().RoomIndex
sry but can somebody tell me why my grabbed object doesnt move at all? even though all of the debug.logs say it should work.. https://gdl.space/enezineley.cs
I haven't used VSC for Unity for a couple of years now but you'd follow the guide and ensure that you've remove the Visual Studio Code Editor package (not supported and apparently conflicts with the new Visual Studio Editor package). May need to also add some extra Unity add-ons as Visual Studio Code doesn't seem to auto complete some (or any) of the Unity callback messages.
thanks. Looks liek these are the ones I currently have:
Without a configured ide, you'll trip and stumble every step of the way on your journey with Unity and folks will immediately know if you do not have a configured ide
Sorry guys, I'm getting this warnings:
The referenced script on this Behaviour (Game Object 'SolarySystem') is missing!```
But I can't find what object/s that have this missing files... any idea?
I did find out it was actually configured...I think, considering it does do the correct autofill (gives me the capitalized option only)
I've noticed I have an error msg about not having any .NET SDKs tho
lol now it's fine 🤭
hey guys. which one of these is better for an AI sight sensor system?
1.https://github.com/walterellisfun/ConeCast
2.
step2)filter out using Vector3.Angle
step3)do lineCast check for all objects that pass step 1 and 2```
wait, this cone casting script dosnt check for occlusion
Did you look at what this github repo actually does? You've just described using the code here or doing what the code does yourself
anyways, are there any better ways then the second way i said
i read the code now
its just a sphere cast with an angle check lol
basically what i described without occlusion checks
pls help me im working on this for 4 days by now
What object did you drag in for grabbableObject?
Also objectGrabPointTransform
my projectile prefab
Why are you trying to move a prefab
The object is moving, but since the object you've dragged in doesn't actually exist you're not gonna see anything
an empty transform childed to the playerCam with an offset
oh. ok
that makes sense
I think I'm not entirely sure what constitutes "configured enough" for my IDE in terms of requirements for asking for help here. I think it's configured all the way.....
Syntax highlight and auto complete specific to Unity
how can i access the instantiated clone instead?
Which clone do you want to reference
Does Syntax highlight just mean where if you highlight a variable it highlights all variables w/the same name?
It means it highlights classes, including ones defined in UnityEngine. If MonoBehaviour is a different color than the default and errors are underlined in red, it's configured
the one i grabbed using my raycast
Okay, so you should probably be calling MovePosition on that instead of an object you dragged in from the inspector
makes sense yeah. how can i access it sth like raycastHit?
You already are accessing it
You're checking its tag
looks like mine does not do that yet.
Try Visual Studio (the purple one, configured) and you'll see what you ought to have with VSC to be productive - relative to intellisense (syntax highlights and auto complete)
I am aware this is an incredibly basic question but, ᴴᵒʷ ᵈᵒ ᴵ ᶜʰᵉᶜᵏ ᵗʰᵉ ⁿᵃᵐᵉ ᵒᶠ ᵃ ᴳᵃᵐᵉᴼᵇʲᵉᶜᵗˀ 🥺
im stupid what should i write instead of the prefab?
Dot net sdk is required to do any c sharp project and I'm assuming the unity vsc guide assumes you've got a c# configured vsc setup #💻┃code-beginner message
.name
Thank you
Instead of getting the rigidbody of something you've dragged in, get it from the raycast. You're already getting the object to check its tag
So get the rigidbody from that the same way
rb = raycastHit.transform.GetComponent<Rigidbody>();?
I do have another question if you're willing, how would I go about lerping the emission value of more than one skinned mesh renderer?
Make sure to select the Unity work load (something you'll have to manually do) when installing the ide - visual studio is an application used for other purposes as well so it'll not be selected by default
Select the Workloads tab, then select the Game development with Unity workload.
(from the guides) @thorn lake
I've tried a for loop and I'm aware getcomponent isn't all that efficient, just can't find the right function 😦
Smr is an array. If you want to set the color of each thing in the array you will need a loop
Wait I might be an idiot
I'm trying to set the smrs colour.. Didn't even get the materials 😭
congrats! 🎉
for VSCode u need that .net sdk
and u can remove PlatformIO from ur extensions.. (thats for programming computer chips)
you can get the sdk from microsoft
i use .net 8.0 since its Long Term Support version (x64)
I have formatted my pc and backup my files before the formatting. But when i tryed to open my project, unity said that i need to open the project in the safe mode. So i opened the file as safe mode and this screen has appeared. What should i do in this situation?
how would i go about making objective system without needing to create loads of c# scripts or loads of classes
Search on the Unity Marketplace if there is a free or buyable system that does what you need
i don't like already made systems, i always want to make things myself to learn but thanks for the idea
objective system gonna be a hand-ful of classes regardless what u do
is it recommended to use object pooling to create VFX effects using vfx graph? For example, i'm trying to make a death effect on an enemy but the enemy is being destroyed so the effect doesn't play. Is it better to make some VFXManager which creates an object (object pooled) at the location to play the effect then is removed after it's done instead of holding the "visual effect" compoennt on the enemy itself?
💯 or ull find urself hacking at other effects too
someone just had the same issue yesterday, had to unparent an effect just to keep it fading away after his obj was destroyed
how do big games manage that? like there are games that have like 500 objectives meaning 500 classes, damn
its probably abunch of classes deriving from a base class
that has all the common functionallity in
You can store data for objectives in scriptable objects deriving from a "task" class or similar

Or load a csv/json with objective data, whatever suits best for you, scriptable object is most likely best cause you can reference prefabs and other internal unity stuff without matching IDs
they just change out the things.. (location, items, rewards, etc) all the same class.. w/ different variables
i would search "objective system unity"
and see what u can learn about it
So just class "Objective", "ObjectiveManager" and storing "Title", "Id", "CompleteEvent" etc?
and like adding objective component to triggers, interactables etc?
If its small scale you can set a timer to wait the same time the animation plays and then destroy the enemy. If you know this will happen more than just this once the pooling + spawning effects at the same position instead as a child is most likely best
public abstract class Objective : ScriptableObject
{
public string Title;
public string Description;
public bool IsCompleted;
public virtual void CompleteObjective()
{
IsCompleted = true;
Debug.Log($"Objective Completed: {Title}");
}
}```
public List<Objective> Objectives;
wait, ScriptableObject? what's that
something u should learn about
heres a scriptable object
im using it to hold all my player data
i can slot in a different one w/ different values if i like.. and it'd work
ohhhh, yea now i understand
If you want a real-world example, see it as a physical quest board in the town hall
Your board is the ObjectiveManager
The ScriptableObject Objective is the paper you can fill out to pin at the board, you can pin as many at the wall with different data as you want
and on my player controller.. it just grabs the values
im making a system to handle all vfx in my game really. So weapon effects, hit effects, spell effects, etc
but there would be so many "files" of Objective class
yes, as many as objectives as u have (many scriptable objects)
Yeah but thats not a problem, you can put them in sub-folders, name them and structure them
like i said earlier.. theres really no way to not have lots of files... if u want lots of objectives
u could put everything in 1 master class. but thas bad
public class ObjectiveTrigger : MonoBehaviour
{
public ObjectiveManager ObjectiveManager;
public Objective ObjectiveToComplete;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
ObjectiveManager.CompleteObjective(ObjectiveToComplete);
}
}
}``` this could be a trigger for example
u just slot in ur objective that would be marked as complete when u enter
(this one being re-useable ofc)
so i'm thinking of holding all my visual effects on an SO so i can call to the fx manager from anywhere passing in an enum which associates with the effect ie enemyHit, etc. I already do the same for audio, good idea?
👍
hmm can i do something like that? and adding that class as a component to other game objects to trigger "completed" Event?
public class Objective : MonoBehaviour
{
[SerializeField] protected UnityEvent completedEvent;
[SerializeField] protected string title;
[SerializeField] protected int id;
}
i dont see why not
the scriptable object idea is u dont need it on a monobehaviour for it to work
a MonoBehaviour would need a gameobject
hi! is it okay to use a while loop inside a coroutine?
as long as u can break out of it
What would specifically be wrong with it? This is common if you want to have behaviour run over frames while something is true.
okay, and another one if i may, is there a way to make a collider become a trigger for certain objects? (example: i dahs towards an enemy and i dash through it, but the enemy collides with the walls)
Is Kinematic Character Controller still the go to? or better options? 3D 3rd person
imo yes
this ones a bit trickier
Look into layer based collisions, you can have certain layers ignore each other.
how many hours on average would you say it would take to learn the absolute fundamentals of c#
kinematic gives u the best of both worlds (rb and cc)
i will! is creating a navmesh better and just making them become triggers as default another viable option?
Theres no answer to this, everyone learns at their own pace. Some people just understand computers better
Do you know other programming languages, especially OOP ones?
havent used navmesh so i wanted to know if it makes sense or if it would just phase through the walls
nope. complete beginner
alright sorry if it's a dumb question
i feel i got a grasp on basic fundamentals about a year or so in.. (a few hours per day) but.. i still learn stuff everyday.. and theres soo many things i haven't even touched yet as well
What would be your goal to have created after that timeframe?
A navmesh is completely independent here of the question. A navmesh agent by default will move along its path, which wont go through walls or anything assuming you set it up properly.
If the enemy has a collider, which it probably should, then you'll need layer based physics no matter what
okay, ty!
I'm really not sure I asked a question without really knowing the result myself. I guess the main thing I want is basic game functionality and good enough code knowledge in order to actually understand the tutorials I follow for more advanced things
50-100 hrs
okay. what way did you go about learning from square one? I'm happy for this to be a long process
alright thank you
i jumped in head first.. https://www.youtube.com/watch?v=_cCGBMmMOFw&list=PLFt_AvWsXl0fnA91TcmkRyhhixX9CO3Lw&ab_channel=SebastianLague
Welcome to this introduction to game development. We'll be starting from the beginning, so no prior knowledge of programming or the Unity game engine is required.
Unity can be downloaded here: http://unity3d.com/get-unity
Watch episode 01: https://youtu.be/9iCnjdXEfMA
If you'd like to support these videos, you can make a recurring monthly don...
this series taught me the basics.. and then i just went hamm on google
One thing as well, if you use a trigger then the person dashing would be able to go through walls or fall through the floor. Depends how you're moving like a rigidbody will fall through by default
thank you so much. sorry for the slight time waste and I appreciate the help from all 3 of the people who have just spoken to me
Unity feels like a wall you run into at first, dont let that discourage you, the tutorial above is a good intro but give it 2-4 weeks of doing bits by bits daily until you feel like you are digging out of the first hole of information and it starts making sense 😄
also check the pinned comments in this channel ^
good resources in there
yeah for sure. I expect no less to be honest. thank you
alright ty
I would really recommend getting a decent grasp of c# first if you have the patience for it. We see many people here struggle with c# while trying to learn unity. Itd be like if you were told to solve complex math yet didnt know how a calculator works
is the best resource for basic C#
u can do that along-side the unity stuff.. or do it first.. i skipped it. but i had some knowledge of coding
okay thank you all
There is also the Microsoft learn site, I havent used any of them in a loooooong time but ms learn is often recommended now
word?
It's what I see recommended in some other places, and by other people here
well i b a sonofa
W3 was pretty good to me for a lot of other languages but now that I think about it, dont think I ever used the c# one too much
i thought microsoft only had docs.. TIL
lol.. 13!
it doesn't even show 9 anywhere. guess ud have to hunt for it
at the most basic level, i dont think anything changed so it shouldnt really matter which version they use
its top down and i meant the enemies being trigger (with a navmesh)
(but the layer solution seems to be the best option for sure)
a layer collision matrix is way more efficient than a Physics2d.IgnoreCollision() right?
I need help with the way a script interacts with/references an input map - can I ask about it here? I am a beginner programmer so I may need beginner help
Yes you can ask here, if its indepth input system you might find better help in #🖱️┃input-system though
What are you planing to do? In certain situations you might want the ignore
that the player ignores objects in the enemy layer
Oh yeah in that case setup the matrix 😄
ty!
I have two characters in my 2D scene and two input maps. As it stands now, I also have two seperate scripts, for movement. I'd like to make one script that has a slot to assign an input map, just to streamline things. I've tried to achieve as such by doing what I did below -
public InputActionAsset _fieldControls;
private void Awake() {
_fieldControls = new InputActionAsset();
...
_moveAction = _fieldControls.Player.Move;
which does result in getting the option to choose the input map when attaching the script to an object like shown.
However, it results in the compiler error, also attached to this as an image. How can I fix it so that I can assign an input map to the script outside of the .cs file but still have that script work with that map?
you should not be creating an instance of an InputActionAsset by calling the constructor
also the InputActionAsset does not have that property on it, if you were generating a C# class from the input action asset then you'd invoke that class's constructor and it would have the relevant properties on it
OnMove is a method that you create, it is not built into unity so the answer is "it is called where ever you call it, or some event invokes it"
But doing it that way limits me to only having one input set for a script, right?
no
its from the unity input system package
no it isn't. it's a message created based on the name of your input action(s). it is invoked by the PlayerInput component when your input state changes for that input action
Oh. How would I make it so that I can choose what input map to use like it is here in a way that works with the script?
it has nothing at all to do with an object's position moving. unless you are moving an object inside of it. but then it's invocation still isn't directly related to the object moving
please go through the documentation pinned in #🖱️┃input-system to learn how to use it
I have. I haven't been able to find an answer to my issue. Every instance I've seen of people talking about using multiple input sets has been about switching input maps. That's not what I'm trying to do
and why is that not sufficient?
i'm following the learn.unity tutorials for a movement script though
so? that doesn't invalidate anything that i said
what exactly does the onmove do then
i need help with procedual generating rooms if anyone could help that would be amazing
whatever the fuck you want it to do. it's a method that you define in your script. and you put what you want inside of it. it is invoked by the PlayerInput component when your Move input action's state changes (like i already told you)
It is a callback for when certain inputs are pressed (if you set up the input action asset properly)
It has nothing to do with movement unless you actually move something in it
sorry bad phrasing
Because I want to be able to create one script for movement, then attach that script to two different player objects, being given the option to choose which input map the script uses when I attach it to the object. I'm not trying to switch the input map from one to the other on a single object
was asking for how it was invoked
none of that prevents you from just using two different maps
and for the third time now, it is invoked by the PlayerInput component when your Move input action's state has changed
yea i saw
thats why i corrected my phrasing
and changed to was
But that answers your corrected phrasing too
yes?
Yes
I want to do it in the same script and make it so that I can choose which input map is used. If I assign an input map in the script then I'm locked to using that input map in that script, which I do not want
I see what you mean. Why change it to was, that is just confusing
fun fact, but you can use one Input Action Asset that has multiple action maps in it. and an if statement to choose which one to enable/actually use in the code.
but of course that would require you to have actually bothered to read the documentation on how to use the input system like was suggested to you
Right, I'm aware of this and have it implemented in my script. That doesn't solve my problem. I need to use a different input map depending on which object the script is attached to. As far as I know, the ability to enable/disable action maps doesn't allow me to use different maps on different objects unless there's a way for me to check what a script is attached to from inside of the script
Sure it does
Why can you not check what a script is attached to from inside a script?
alright we've reached the point where it has become clear you haven't bothered paying attention to anything i've told you so i'm done attempting to help now. do yourself a favor and actually read the documentation pinned in #🖱️┃input-system so that you might actually get a clue as to what the fuck you are doing
I have. You are not processing my question. I appreciate that you tried and understand you're done helping - thank you
I... don't know. Are you asking rhetorically or do you know how I might be able to do that?
no, i definitely did read and understand your question. and i provided information on how you could solve it, but you refuse to actually process what i've told you because you don't have the requisite knowledge you should have for using the input system
I mean, it is extremely simple to do...
What do you want to check for? .gameObject .transform .TryGetComponent .tag .layer what? There are SO MANY ways to check what a script is attached to
They definitely processed and answered your question
How would I do that?
Edited
ty
or it's as simple as a serialized boolean or enum to determine which action map to enable
A serialized enum would be nice
because you just need an if statement to determine which of your action maps need to be enabled
as i already said
I am sorry that I need more help as you've made clear it's an annoyance, but I am a beginner to Unity, and I have no idea how to do that. Would you be willing to point me in the direction of what documentation to look for to achieve that?
the documentation pinned in #🖱️┃input-system will teach you how to use the input system. from there it's just a matter of knowing the absolute basics of c# to write an if statement
For pete's sake, dude. I know how to write an if statement and I know how to enable and disable input maps. I do not know how that would solve my problem without the ability to check what object the script is attached to. I'm trying to figure out how to do that - if you're not willing to help me figure that out, just say so and move on
Does the input system documentation explain how to make a serialized boolean?
no, but making a field show up in the inspector should be something you already know how to do
Well I don't, because I'm a beginner, hence me asking for help in the beginner channel. I am an idiot and I do not (yet) know what I'm doing. If that upsets you and you're unwilling to help because of it, that's fine. Bye
then start with learning the basics. the pathways on the unity !learn site are a good place to start
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
and maybe also consider reading the rest of your code because you have been making fields appear in the inspector already
as shown here: #💻┃code-beginner message
https://hastebin.com/share/zemeredige.csharp
why is this not working?
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
be more specific about what exactly isn't working
also maybe consider using a site other than hastebin since it likes to take forever for the code to actually appear on the site
im following the player movement thing on learn.unity but its just not working
i got the same thing when i first got here lol
guys, I want to trigger a function in a class for multiple instances of the same script.
Like the enemy, when I run the walk script in the enemy script all other enemies also trigger that script.
This is the list of event types I found:
Delegates, Event Delegates, Actions in Unity, Unity Events, Scriptable Object Events
But yeah chatgpt is just suggesting SOE and it's too much.
you're adding a very small amount of force each fixed update, it's probably not enough to overcome friction, multiply your movement vector by your desired speed
ah thanks
I did not realize that box was called the inspector - that's my bad. Dumb misunderstanding on my end. Okay. I do know how to make fields appear in the inspector, but I don't know what a serialized boolean is in this context nor how I would implement it. Would I just declare like "public Boolean thisIsAboolean;" in my script and get a T/F field in the inspector?
Fair point. I will do that now
probably the worst way to do it but make a public variable that is saved as 1 when the script is running and 0 when its not
Okay. Cool. I'm sorry for needing my hand held on something that simple and silly
Is there any chance there's documentation anywhere that has like a list of what variable types can be fields in the inspector?
You shouldnt be using chatgpt especially if you dont know what you're doing.
Delegates, events, actions are all the same thing. Unity event is just a c# delegate thats exposed in inspector, lets you subscribe things in inspector. Scriptable object events are not a thing.
anything that is serializable or UnityEngine.Object types
https://unity.huh.how/serialization/serializing-a-field-1
i multiplied it by 1000 and it still isnt moving
is the rigidbody kinematic
also have you confirmed that your OnMove method is being called
In your case, you would maybe want some event that all these enemies are subscribed to. Then the player can invoke the event when they run. though you'll need some way of determining which is truly the player, so enemies arent trying to invoke this function as well. (assuming thats the logic you want)
no its not apparently
This is a really helpful website; thank you. Is variables being serializable a unity-specific concept or a general programming concept? Either way I'll work on learning that/how it works
not in my case, It's just a bad example from me. I think something like static event
being shown in the inspector due to being serializable is a unity-specific thing, but serialization is a programming concept for turning data into a format that can be saved to disk
do you have a PlayerInput component attached to the same object that this component is attached to?
Thank you
well yea thats what i said, i just didnt write static. but you should truly just say what the use case is. its tiring when people want to hide what they're truly doing, then get told a suggestion just to respond with "well im not really doing this"
i dont use static events often but this seems like an ok use case for it
sorry
tks
the player input component just detects what key is pressed right
thanks
Bit of a general question. How do people tend to do player characters in games? If I'm to be more specific, do you add character controllers, colliders, and rigidbodies? What are your settings for those things?
That's a really vague question. It depends heavily on the specific game you're making. Every game is different and has different needs
Still very vague
Dear Esther and Apex Legends are both first person games
And they have extremely different needs and character control styles
Fair point. Might need to think about this a bit more
Hello, im relativly new to csharp and unity in general but for me to learn its best if i experiment and i was wondering if anyone knows a good first person controller tutorial ish
^ You can't go wrong with Brackeys! Even though his tutorials are old and there might be new features to mess with, they tend to be very clear and concise
I went ahead and just brainstormed what I want onto notepad. I came to a conclusion on my own, but was curious if you have any opinions.
Unfortunately Brackey's popular FPS controller tutorial has some glaring unfixed errors in it. But it's generally decent
If you're using a Rigidbody you definitely don't want "horizontal moviement to still use Transform.Translate"
You will do all the movement through the Rigidbody
Gotcha
I currently only have the blue option (VisualStudio Code) and was recommended to download the purple one. I didn't realize there's be multiple options. Which of them would be best just for some beginner Unity gamemaking?
none
get community 2022
those are old
update your visual studio installer its probably outdated
I just downloaded it now. Is it just the wrong installer?
where you dl from ?
uh yeah not sure why its showing you 2019
hmm weird
bottom right what is the version on VS installer
oh weird, After closing it and reopening it it seems to have changed
crazyy
Magic
thanks sm
If your IDE is not underlining errors in red or autocompleting code,
please configure it using the link below:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
Are these what you mean by modules?
oh wait nvm, I was just reading the wrong sections of the webpage
Does coding a game in C# restrict what platforms it can be played on? I might've misunderstood someone a few days ago who made it sound that way
no it all gets compiled into machine code
unity has all platforms pretty much
"Navigate to the Common7/IDE directory inside your Visual Studio installation directory and select devenv.exe. "
I'm assuming this needs to be added as the External Script Editor rather than Visual Studio Code but I'm not seeing a "Common7/IDE" directory.
It says it is in the Visual Studio installation directory but I'm not seeing any sort of Visual Studio installation directory.
you dont have to navigate to any directly if you did it correct you should just see visual studio popup in external tools
if you're manually assigning exe you did something wrong
(make sure you did restart unity after you installed everything)
I only see this optioin but that's for the blue Visual Studio program. I do think I restarted everything but I'll do it again justttttt in case
I did not install any additional modules aside from "Game Development with Unity" yet.
nothing else is needed for unity
Could it have anything to do w/how I didn't set this portion up yet? (I wanted to ask for advise regarding which might be best practice for game creation out of these options before choosing one)
you don't have to touch any of that, you open the script from unity it will automatically load the proper csproj/assembly
just make sure you do have visual studio editor in the package manager ?
doesn't hurt to restart whole pc at this point too lol
Could it be because the project existed before VS (purple) was installed?
Wondering if I should make a new project
these settings are Editor wide not project wide
did you check this just incase #💻┃code-beginner message
I was told to remove that by someone here earlier. I'll Install it back in
rip
we're talking about the visual studio editorone or visual studio code editor
they have two different ones
Thanks sm!
clicked it and nothing happened. Is that.....ok?
yeah double click a script from unity, make sure its all loaded up
woot woot!!
cookin with gas
Maybe it was "Visual Studio Code Editor" that they were saying to uninstall
probably
it conflicts with VSCode / Unity connection now since it no longer is being used for communicating the two programs
Thanks!
Earlier someone told me that I need to have a ".net SDK" to do any C# project. How do I make sure that I have that? (I'm assuming it's there by default with this purple VS
Unity already comes with .net standard and i think another one bundled
you need the .net sdk if you ever want to make other apps instead of just unity
ah ok
or use VSCode for unity
He must've been referring to VSCode bc hat's what I was using at the time
From what I've gathered, I should just stick to only VS (Purple)
it was, thats what i thought u were using at the time
It was, but I didn't realize that I needed the purple one to have the IDE calibrated properly
purple ones better for beginners
im hooked
I really dislike the naming convention for these two programs lol. The fact they're named so similarly made this beginning process so confusing haha
ya, everyone feels that way
yeah microsoft really fdup this one
I'm surprised no one said "Wait a min" about that decision ngl
before it was finalized haha
for the logo they just said, meh.. make it blue
and its missing a piece cause its a not real ide xD
thats why u run both
VS always looks badass like a masked hero coder lol
lol:
aye! lol
lol
the newer versions of unity handle both pretty well now
u can switch back and forth relatively easy
I'm trying work on Timesplitters 5 rn
soo u finally gonna get coding now that u have an ide set up?
Anyways, thanks guys. I feel like I've graduated from Unity coding infancyh into adolescence now.
or are u still in the process 😅
I'm pretty sure it's all set up now
👍 nice... good luck 🍀
Hello, what's the proper way to implement "confirm quit popup" on pressing back button on Android?
I'm seeing suggestion to check for input in update but I'm not sure if that's best way to go about it since it's in update
Checking for user input in update is the preferred way to do it
how do i access Sorting Group component through code ? there is no GetComponent <SortingGroup>()
my god i thought i already implement UnityEngine.Rendering ma bad
Is there way to make variables collapsible in the Editor?
I have a lot of variables that aren't necessary sometimes; so it would just be clean if I could dollapse them to make things look tidier
Thanks!
are you asking about in unity editor which is what i thought or the IDE? for unity editor you'll either need to look into editor scripts like using EditorGUILayout.Foldout, or put the variables you want in a serializable class which should already have this dropdown looking button to expand it
Yeah, I'm currently looking into those.
working good so far 👍
the thing linked above would be for your IDE. The solution depends how you're using the variables. Like if these were public variables being used, and weren't neccessarily related to each other you wouldnt want to throw them in a class which would change how other things use it.
IIn which case you'd need a custom editor script
Thanks!
I have a problem