#archived-code-general
1 messages · Page 225 of 1
here
yes, then loop through the string and check the char one by one
uhh.... you know what I'm gonna ask...
here is the scirpt:
using System.Collections;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class Test : MonoBehaviour
{
public TMPro.TMP_InputField inputField;
public string desiredString = "1";
public GameObject correctObject;
public GameObject incorrectObject;
private void Start()
{
if (correctObject != null)
{
correctObject.SetActive(false);
}
if (incorrectObject != null)
{
incorrectObject.SetActive(false);
}
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))
{
CheckAndShowObjects();
}
}
void CheckAndShowObjects()
{
Debug.Log(inputField);
if (inputField != null && !string.IsNullOrEmpty(inputField.text))
{
if (inputField.text.Equals(desiredString))
{
StartCoroutine(ActivateAndDeactivateWithDelay(correctObject));
Debug.Log("Correct!");
}
else
{
StartCoroutine(ActivateAndDeactivateWithDelay(incorrectObject));
Debug.Log("Incorrect!");
}
}
}
IEnumerator ActivateAndDeactivateWithDelay(GameObject targetObject)
{
if (targetObject != null)
{
targetObject.SetActive(true);
yield return new WaitForSeconds(2.5f);
targetObject.SetActive(false);
}
}
}
yes, loop the text and check the string
https://stackoverflow.com/questions/8793762/what-is-the-fastest-way-to-iterate-through-individual-characters-in-a-string-in
just read the comments see how they iterate the string
IT WORKS!
I just made my own version
kind of
and it works
thanks for telling me to put it in a loop and told me to make a TMP input field
hi i've got a simple coroutine that moves the player over a duration, but since its physics based, I'm having some trouble getting it working the same at different frame rates (which I only noticed since I recently lowered the interval between time steps for more consistent physics [from 0.02 to 0.005]). Everything else in the game i've simply multiplied by time.unscaleddeltatime so I'm clearly misunderstanding how waitforfixedupdate or time steps in general work. Any help would be appreciated
Impulse mode is the wrong mode to use. That's only for single force events, continuous forces should use Force or Acceleration
oh cool thanks for letting me know, I’ll make sure to fix that. surely this wouldn’t have different effects based on the frame rate though would it?
it might
actually probably does because Impulse specifically ignores fixedDeltaTime
Guys, I am a beginner in Unity, and I would like to know if it's okay to use this architecture in my game about a pharmacist simulator.I have been working for a day and I don't know if I have indeed started correctly?
oh damn didn’t know that. thanks a ton I’ll give it a shot
how should I keep an object across scenes? or should I just make my camera a prefab?
https://learn.unity.com/tutorial/implement-data-persistence-between-scenes#
idk this is the first link when i google it
In this tutorial, you’ll learn how to use data persistence to preserve information across different scenes by taking a color that the user selects in the Menu scene and applying it to the transporter units in the Main scene. By the end of this tutorial, you will be able to: Ensure data is preserved throughout an application session by using the ...
this question is not possible to answer based on a screenshot of your file organization alone. the location of your files have literally no effect (excluding stuff like Resources). As long as they are easily accessible and not a pain to search through, then your file organization is fine.
It matters more what you are doing code wise to say if your architecture is fine or if you've started "correctly". Although based on the final names alone, I will say this gives me feelings of a web dev based background. You may end up overengineering trying to apply some other development techniques into game development.
I want to use the DI vcontainer, StateMachine for now, what can you say, criticize it as it actually is, because criticism is always welcome to me.
there isnt really that much to say, as i dont know what most of your code is doing. StateMachines are commonly used as they're easy to setup if you dont require very complex logic. As for DI, I feel it isnt really needed for unity.
In the future, I would like to further develop my game by adding different scenes and unique logic. I believe that using DI will improve performance because I handle the references myself, as well as other aspects. I want the logic to be able to increase in volume in the future but involve less time for creation.
And since performance is always welcome in Unity, I think it would be okay to use it.However, I'm not just talking for the sake of it. Your opinion is a key point, because alone you can't know for sure if you're doing something right or not.
As far as i know, DI will do absolutely nothing performance wise and has no affect on what the user sees while playing the game. If you want to use that, thats entirely fine and dont let me stop you. First just to inform you, the profiler is the tool you'll want to use if you ever have performance concerns.
For example, DI wont do anything if your problem is that it takes awhile for the user to load scenes (due to creating a lot of objects). These objects still need to be created, and most of them probably arent suffering from doing a ton of GetComponent calls.
since performance is always welcome in Unity
This is somewhat true, id say you should just start developing without really worrying about this. Obviously dont intentionally write slow code, but theres no need to go out of your way to write super performant code in every step. You can do a lot before you notice any performance issues at all. These performance issues are more likely gonna be from 1 area anyways (like wanting to run 100s of enemies with complex logic).
For DI (and just a lot of areas in CS), people LOVE to toss around words like "decouple" "scalable" "modular" etc etc. Sometimes these really dont mean anything. Especially if theres no proof provided like benchmarks or examples of how their system saves you from doing work. Sometimes you end up writing more code to get something working just so that it can be "modular" but in reality it has no other uses. At the end of the day, you could make every system in your game "decoupled/scalable/modular" but if its not used then whats the point
meant to reply to you on the message above. sorry took awhile to respond, something came up.
thx for ans
uhm what do you guys do keep player data between scenes?
i have posted a link for you
Can I ask questions here?
Depends on what kind of question, read the #🔎┃find-a-channel for info
oh you did, thanks I thought it wasn't for me :'D
Sure okay
So I was watching this tutorial yesterday on a simple chase AI https://www.youtube.com/watch?v=ieyHlYp5SLQ
But the navigation AI has functionality has since been moved to a plug-in (which I installed)
In the video he baked the floor on which the enemy has to walk. That bake option appears to be removed (supposedly the source of my error)
The error I am facing is:
"FunctionName" can only be called on an active agent that has been placed on a NavMesh
I think this is caused because my ground is not flagged as a NavMesh, how do I do so?
There is a legacy option which I have yet to check out, but I propose there should be a more elegant solution in the updated AI navigation.
Yeah, you need to add the navigation component to the mesh you want to navigate on now.
Yeah that one, was looking for it for you
I think following that manual will result in something working in the new system. Kind of annoying that it changes constantly 
It's good that they keep updating their stuff, will make stuff better in the long run
(unity UI though 👀 )
Works like a charm! You're a legend @main shuttle
Thank you so much

Just FYI, the info thing is quite useful, it took me a while to notice that one the first time I tried.
Noted, I will have to look into NavMeshObstacle cause in the tutorial he did it manually. The solution now seems much more elegant
Guys I need help with a memory leak. Unity crashes less than a seconda fter I start the game, there is a single line causing it
and this is it's context:
public void Add(gridObj soldier, bool doit = false)
{
if (!init)
{
return;
}
if (soldier == null)
{
Debug.Log("tryingto add null");
}
//Determine which grid cell the soldier is in
Vector2 cellPos = gridIndexAtPosition(soldier.soldierTrans.position);
int cellX = (int)cellPos.x;
int cellZ = (int)cellPos.y;
//Add the soldier to the front of the list for the cell it's in
if(cellX > size || cellZ > size)
{
Debug.LogWarning("Object is out of the bounds of the grid partioning system, at position (" + soldier.soldierTrans.position.x + ", " + soldier.soldierTrans.position.y + ")", soldier.soldierTrans);
return;
}
//Add the soldier to the front of the list for the cell it's in
soldier.previousSoldier = null;
soldier.nextSoldier = cells[cellX, cellZ]; //WHY DOESN'T THIS WORK??
//Associate this cell with this soldier
cells[cellX, cellZ] = soldier;
if (soldier.nextSoldier != null)
{
//Set this soldier to be the previous soldier of the next soldier of this soldier (linked lists ftw)
soldier.nextSoldier.previousSoldier = soldier;
}
}
I need some help because I have no idea why setting a simple class does that. I can show more details, just ask
what is [,] operator in your implementation or it is just an regular 2D array
regulard 2d array of these objects:
[System.Serializable]
public class gridObj// : NetworkBehaviour
{
public FishNet.Object.NetworkObject soldierMeshRenderer;
//To move the soldier
public Transform soldierTrans;
public gridObj previousSoldier;
public gridObj nextSoldier;
//The enemy doesnt need any outside information
public virtual void Move()
{ }
//The friendly has to move which soldier is the closest
public virtual void Move(gridObj stuff,Vector3 oldpos, Vector3 newpos)
{ }
}
another piece of information, I use this to add thins to a grid, it works when I initialize
now I'm calling it from another void, which is resposible for checking if the object has changed grid
and there it doesn't work
AKA crashes
have you read the log btw
what log are you talking about
!log
!logs
oh, the crash reported will generate logs when editor crash
I tried but it didn't say anything
also the profiler doesn't show an increase at all before crashing
which is weird
What does cells contain? Are those the gridObj's?
yes, 2d array of them
no logs under AppData\Local\Temp\Unity\Editor\Crashes?
when the editor crash a crash reporter will pop up
Okay, smells to me that its some kind of deep copy/shallow copy shenanigans going on, and that it doesn't clean up.
And that's above my pay grade. 
As far as I know: soldier.nextSoldier = cells[cellX, cellZ]; creates a new shallow copy object for soldier.nextSoldier instead of creating a reference to the object that is in cells. Same with cells[cellX, cellZ] = soldier;, as far as I know, if you = reference types it creates a copy instead of assigning the existing object.
oh i understand what you are trying to do
it is a double linked list
I don't know to be honest. I know reference type = is a common point of failure. Perhaps with a ref you can tell it to reference the existing one. Anyhow, I should really leave this to someone more knowledgeable, but I think the problem lies there.
Yeah
do you have code that iterate the list
You mean gets all of the linked ones, yes
a safer way is create a struct like this:
public struct Head{
int length;
Class instance;
}
```each time when you insert something at head then length++, remove something=>length--
the linked list has a cycle in it so dead loop
okay, but that's not where it crashes, I think
wait I'll show where it's calling from when it crashes
maybe that's it
btw is the editor crash (suddenly get shut down and pop up a crash reporter) or just freeze (no response to any input)
public void Move(gridObj obj, Vector3 oldPos,Vector3 newPos)
{
//See which cell it was in
Vector2 oldcellpos = gridIndexAtPosition(oldPos);
int oldCellX = (int)oldcellpos.x;
int oldCellZ = (int)oldcellpos.y;
//See which cell it is in now
Vector2 cellpos = gridIndexAtPosition(newPos);
int cellX = (int)cellpos.x;
int cellZ = (int)cellpos.y;
//If it didn't change cell, we are done
if (oldCellX == cellX && oldCellZ == cellZ)
{
return;
}
//Unlink it from the list of its old cell
if (obj.previousSoldier != null)
{
obj.previousSoldier.nextSoldier = obj.nextSoldier;
}
if (obj.nextSoldier != null)
{
obj.nextSoldier.previousSoldier = obj.previousSoldier;
}
//If it's the head of a list, remove it
if (cells[oldCellX, oldCellZ] == obj)
{
cells[oldCellX, oldCellZ] = obj.nextSoldier;
}
Add(obj,true);
}
freeze, as I found out
But it's also a memory leak right?
Perhaps adding the debugger and Pausing it in your IDE is the best option then? To see where it goes into a loop?
Because my game with 1 character and a plane is also 5.5GB
normal it's less than 2gb
it's a small 2d game
It can take a while for it to accept the break all, but it should do it after a while
Could anyone help me with some code problems. i having problems with rotations. pls Dm me if you can help
very doubtful anyone is gonna DM
i dont want to fill the chat up with all my images...
You can create a thread if needed
📃 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.
but i have to show what happening in the game scene though
il create a thread
ok, wouldnt a video make more sense than a bunch of images ?
This seems bad though?
(Filename: Assets/AnimalBase.cs Line: 94)
OutOfMemoryException: Out of memory
at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_array_new_specific(intptr,int)
at System.Collections.Generic.List`1[T].set_Capacity (System.Int32 value) [0x00021] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at System.Collections.Generic.List`1[T].EnsureCapacity (System.Int32 min) [0x00036] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at System.Collections.Generic.List`1[T].AddWithResize (T item) [0x00007] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at spacepartitioning.Grid.returnObjectInCell (UnityEngine.Vector2Int cellPosition, spacepartitioning.gridObj[]& objects) [0x00033] in C:\Users\smkza\Desktop\Starve\Assets\GridPartitioning.cs:242
at AddToPartitioning.move (UnityEngine.Vector3 oldpos, UnityEngine.Vector3 newpos) [0x0001c] in C:\Users\smkza\Desktop\Starve\Assets\AddToPartitioning.cs:38
at AnimalBase.refresh () [0x0001d] in C:\Users\smkza\Desktop\Starve\Assets\AnimalBase.cs:94
at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_array_new_specific(intptr,int)
at System.Collections.Generic.List`1[T].set_Capacity (System.Int32 value) [0x00021] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at System.Collections.Generic.List`1[T].EnsureCapacity (System.Int32 min) [0x00036] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at System.Collections.Generic.List`1[T].AddWithResize (T item) [0x00007] in <4a4789deb75f446a81a24a1a00bdd3f9>:0
at spacepartitioning.Grid.returnObjectInCell (UnityEngine.Vector2Int cellPosition, spacepartitioning.gridObj[]& objects) [0x00033] in C:\Users\smkza\Desktop\Starve\Assets\GridPartitioning.cs:242
at AddToPartitioning.move (UnityEngine.Vector3 oldpos, UnityEngine.Vector3 newpos) [0x0001c] in C:\Users\smkza\Desktop\Starve\Assets\AddToPartitioning.cs:38
at AnimalBase.refresh () [0x0001d] in C:\Users\smkza\Desktop\Starve\Assets\AnimalBase.cs:94
more information never is
this is due to dead loop
No what I mean is, that that screen shows you that you infinitly nest objects.
returnObjectInCell is the problem then I guess
It's not really infinite nesting in the debug window, they just display an object that have a reference to its predecessor and successor
And they went through a few successors, then back and forth
public void returnObjectInCell(Vector2Int cellPosition, out gridObj[] objects)
{
List<gridObj> objList = new List<gridObj>();
gridObj currentSoldier = cells[cellPosition.x, cellPosition.y];
if (currentSoldier != null)
{
objList.Add(currentSoldier);
// currentSoldier = currentSoldier.nextSoldier;
while (currentSoldier.nextSoldier != null)
{
currentSoldier = currentSoldier.nextSoldier;
objList.Add(currentSoldier);
}
}
objects = objList.ToArray() ;
}
```could this be it, or is something else, like nesting
I don't immidieatly notice anything wrong with this
no, Move() and Add() are the only oens
you should do this instead:
current=head;
while(current){
list.add(current);
current=current->next;
}
I'll try
if you cant figure why there is loop:
https://leetcode.com/problems/linked-list-cycle/
Can you solve this real interview question? Linked List Cycle - Given head, the head of a linked list, determine if the linked list has a cycle in it.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node t...
just copy the algorithm to detect
i think maybe the grid is not correctly initialized, or adding a same object to the list, let me think about this
I'm trying to see how many tiems it loops in this:
public void move(Vector3 oldpos, Vector3 newpos)
{
gridObj[] list;
Vector2 pos = partitioning.grid.gridIndexAtPosition(transform.position);
partitioning.grid.returnObjectInCell(new Vector2Int((int)pos.x,(int)pos.y), out list,true);
foreach (var item in list)
{
if(item.soldierTrans = transform)
{
partitioning.grid.Move(item, oldpos, newpos);
break;
}
}
}
adding same object should be resulted on dangling pointer but i am not sure if this will causes cycle
if(item.soldierTrans = transform)
Unity doesn't help here, by having the implicit conversion to bool
It would have made a compiler error if that conversion wasn' t there
yes adding same object will result on cycle too
eg:
if Head->A->B->C->D, adding B again
Head->B->A->B while pointer to C loses
was that it?
it seems to not
freeze now
though
what I wanted does not work
but at least It doesn't freeze
idk how you move the soldier but i will create a Dictionary<Transform, gridObj> so i can get the gridObj, idk if this work in network
That would be very slow, no?
much faster than iterating the double linked list and search on it
huh
Dictionaries are made to be extremely performant when searching a value from a key
I'll do that later on, right now I wanna see why the animal does not update it's cell position
For serializing ScriptableObject Instance references in JSON, should I just have them all in a list I map through the Inspector, have a folder and load them all by ressource on game start (with some sort of RessourceManager), or something else? (also are theses only a matter of preference?)
They will be found, which ever way they’re stored either by Id or localizationEntryName.
I might end up using this design pattern on more than one thing. Thanks!
Finally finished making my weapon system (for now). 
Best part, it's not tested even once. 
anyone here used Microsoft mesh before please..
a. dont crosspost across channels
b. you're not getting an answer is because you should read this
https://dontasktoask.com
here a TLDR
I have a question about** [thing] ** but I'm too lazy to actually formalize it in words unless there's someone on the channel who might be able to answer it
I asked here again cause I thought maybe it wasn't a "beginner code" problem, but sure, my bad.
and I also I'm asking about if anyone is familiar with it because I am yet to find anyone who used it before. and I'd like to talk personally to that person cause it could become a paid offer for what I'm looking for.. (as it is very urgent, like, "today urgent")
however if not then, my question is, I've been trying to create something for Microsoft mesh, only problem is that I created normal C# scripts, so when I tried uploading it to the mesh environment, it didnt allow me to because apparently it cant compile "Assembly C#" components, I was wondering what should I do then, I found out that I need to make a visual script, but then still it kept only showing me for everything that I do that its "not allowed", hence the question "is there anyone who worked with this before", because out of everyone I asked, no one knew what is that or why it happens.
question then becomes, is it even possible to use normal C# scripts SOMEHOW in mesh environments, in a way that I don't know.
what is mesh environments and was is the relation to Unity in this ?
guys i am making an application that converts speech to text in unity engine, how can i do it ?
Okay I got another question:
My OnCollisionEnter is not being called. The capsure collider has "IsTrigger" and the enemy has a rigidBody (would have rather given it a character controller)
(I tried OnControllerColliderHit before and that was not calling when the enemy touched the player - (enemy had a character controller))
OnTriggerEnter should work with a character controller I believe if you want to use that
I'll try that
Otherwise cast directly using OverlapCircle/OverlapSphere
Then I'd have to use 2 different spheres
cause both are already using that
but no big deal I suppose
Trigger is working
idk why the other 2 aren't 🤷♂️
Well, not saying you should opt in using it, but OverlapSphere basically just allows you to do what those methods do but give you more control
I know some things can be done on other threads but can I for example create a collider on another thread then apply it to a gameobject on the main one later?
Meshes yes but colliders?
Meshes can be computed for the most part, but using Unity's collider functionality is through their own estimation methods, so it's not like you're doing the calculations. So, it's probably better to clarify what you're trying to accomplish.
Most what you can do outside of Unity methods is usually single-threaded. Any multi-threading capabilities are usually handled under the hood by unity itself outside of any native async methods or such.
when I call Collider2D. Distance, I keep getting the error: "Assertion failed on expression: 'contact != NULL'
UnityEngine.Collider2D:Distance (UnityEngine.Collider2D)"
The stacktrace brings me to a line where I call.Distance, but idk what it's trying to tell me to fix
Hi, I am using the Karting sample to create my first server using UDP client/server. I have this script https://paste.ofcode.org/vr5KTtSMt8UwziqQRD2iPN and I want to change the follow and look at gameobjects depending if the player is player or player 2 which is set in the line 38-49. I have tried inside the if clause looking for the camera by tag, changing priority but everything returns a Null reference in line 52 in Unity but works well in the build version. Could someone help me on how could I achieve this?
Another weird thing
I added a 2nd post processing effect to my project, but it doesn't appear.
However, the script is being called correctly and the intensity is adjusted as intended.
i was wondering if it matters if i'm trying to destroy a gameobject that was already destroyed
anyone know how to debug this sort of error?
It is caused by mainCollider.Distance(overlapCol), and neither input collider is null
Not necessarily looking for a fix for my problem, as much as I'm looking for how I'm supposed to get more info about that "AssertionFailed" error
Hmm make sure that mainCol is not the same as overlapCol? Just a guess
At a guess, the 2 colliders are touching/overlapping which would lead to a bad distance calculation
but i remember having issues with it way back
but if you're getting the error on calculation i guess you wont get the object
back
That is the case where .Distance is supposed to calculate distance
but Distance of what. Are you expecting a negative distance?
still shouldnt give the error
it should return the object with IsValid false or something like that
Ensure that both mainCollider and overlapCol are enabled and have valid collision shapes.
Check if any of the colliders are triggers. Triggers are not considered in the physics engine’s collision detection.
Make sure that the layers of the two colliders are set to interact with each other in the Physics2D settings.```
try this
Distance gives positive distance if two colliders are appart, 0 if in contact, and negative if overlapping
it's the magnitude of the vector required to push 2 colliders out into contact, or pull 2 colliders to be exactly in contact
if you have 2 colliders so you have 2 transforms, calculate the distance using the transforms positions
they are not the same collider, but both have CustomCollider2D
Steve this is more like 2D version of Physics.ComputePenetration
that's correct
collider distance calculates the minimum distance
not just from the center of the objects
Ah, I dont do 2D
both are CustomCollider2D
you really have to make sure there are shapes assigned
and working with CustomCollider2D, I don't think this class has been very well tested lmao
because as far as i searched most answers are that they dont have shapes assigned
they are not null
the colliders itself, but they dont really exist
you know what, let's do some more assertions to check
Did you check the trigger thing that michael scott pointed out?
Here
And layers have to be able to interact in the Physics2D settings
I'm going, but recompiling for every response slows me down a bit
yes, both have shapes
this only happens between 2 CustomCollider2D.
the same method works for all sorts of colliders, and is only breaking now for CustomCollider2D vs CustomCollider2D
box vs box, box vs custom, edge vs custom, box vs composite... all work
I only trip this assertion for custom vs custom
for reference, my customcollider2D is a couple of polygon shapes, then one edge shape with a radius that goes all around it
The error disappears if I get rid of the edge shape
but that can have other side effects.
and also, I really need that edge lol
another bit of info. one .Distance call trips TWO identical assertions. probably because there are multiple contacts?
Or none, since the message says that contact != null failed
But that check is made on the C++ side, the assertion isn't there in the C# code, and Distance calls a Distance_Internal() that's bound to a native function
that's my core issue right now
I can't see wtf is going wrong
and the assertion message is totally useless
if I call Rigidbody2D.Distance (which I think connects back to the same injected function), I trip the assertion, AND it calculates a valid ColliderDistance2D object anyway
How can I add the xRotation value to the game without breaking the camera rotation.. If I use targetCameraRotation, the camera spins so fast on all axis that you can't really use that. For now I have set targetPlayerRotation for the rotation of camera. So the camera can now rotate horizontally as supposed to but I want to move it vertically as well.```cs
void Update()
{
UpdateCameraPosition();
float mouseX = Input.GetAxis("Mouse X") * (mouseSensitivity * 10) * Time.deltaTime;
float mouseY = Input.GetAxis("Mouse Y") * (mouseSensitivity * 10) * Time.deltaTime;
xRotation -= mouseY;
xRotation = Mathf.Clamp(xRotation, -90f, 90f);
targetCameraRotation *= Quaternion.Euler(xRotation, mouseX, 0f);
targetPlayerRotation *= Quaternion.Euler(0f, mouseX, 0f);
player.rotation = Quaternion.Lerp(player.rotation, targetPlayerRotation, playerRotationSmoothness * Time.deltaTime);
transform.rotation = Quaternion.Lerp(transform.rotation, targetPlayerRotation, playerRotationSmoothness * Time.deltaTime);
}
is there a way to make a function generic to work for any of a set of specific classes?
specifically, I want MakeCollider<T>(T col) where T is BoxCollider2D or CompositeCollider2D or PolygonCollider2D
yes, but I want to exclude things like CircleCollider2D as potential arguments
all the methods used in the method belong to Collider2D. But I want to make sure it only gets called for specific derived types of Collider2D, and not others
You want like an 'inverse type constraint'?
My code currently looks like
Collider2D originCollider, ref PhysicsShapeGroup2D shapes) {
Debug.Assert(((originCollider is CompositeCollider2D)
&& (originCollider as CompositeCollider2D).geometryType == CompositeCollider2D.GeometryType.Polygons)
|| (originCollider is PolygonCollider2D)
|| (originCollider is BoxCollider2D)
|| (originCollider is CustomCollider2D),
"Can only make this rounded shape for polygon-based colliders!");```
which is like a horror movie
I don't NEED to fix this. but... this looks pretty bad
alternatively private static Hashset of types to check.
can't you do just
MakeRoundedCompositeWithoutWrapper(CustomCollider2D custCollider,T originCollider, ref PhysicsShapeGroup2D shapes) where T: BoxCollider2D, CircleCollider2D
im not sure exactly, cant remember
if this will work or not
does that work?
give me a sec
I can't
nope
The type constraints are AND, not OR
all these things are sealed
sealed builtin class
Something like extension methods but for interfaces would be cool
extension fields would help tremendously
or just.. being able to modify these things lol
can anyone for the love of everything explain to me why this isn't working-
why are none of the functions being called.
public class LockOn : Singleton<LockOn>
{
private void OnEnable()
{
PlayerInputHandler.Instance.playerInput.Player.LockOnHold.performed += _ => EnableLockOn();
PlayerInputHandler.Instance.playerInput.Player.LockOnHold.canceled += _ => DisableLockOn();
PlayerInputHandler.Instance.playerInput.Player.LockOnToggle.performed += _ => ToggleLockOn();
}
private void OnDisable()
{
PlayerInputHandler.Instance.playerInput.Player.LockOnHold.performed -= _ => EnableLockOn();
PlayerInputHandler.Instance.playerInput.Player.LockOnHold.canceled -= _ => DisableLockOn();
PlayerInputHandler.Instance.playerInput.Player.LockOnToggle.performed -= _ => ToggleLockOn();
}
[SerializeField] private bool isLockedOn = false;
private void ToggleLockOn()
{
if (isLockedOn)
DisableLockOn();
else
EnableLockOn();
}
private void EnableLockOn()
{
isLockedOn = true;
}
private void DisableLockOn()
{
isLockedOn = false;
}
}```
Are the input actions enabled?
yeah, the other scripts work perfectly
Is OnEnable getting executed here?
oh my god, it just now showed the error
it's not finding the input system in the OnEnable function.
idk if this system is sloppy or what
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ConveyorBelt : MonoBehaviour
{
public float speed;
public Vector3 direction;
public List<GameObject> onBelt;
// Start is called before the first frame update
void Start()
{
gameObject.GetComponent<MeshRenderer>().material.SetFloat("_Speed", speed/8);
//gameObject.GetComponent<MeshRenderer>().material.SetVector("_Direction", direction);
}
// Update is called once per frame
void Update()
{
if(transform.eulerAngles.y == 0) {
direction = new Vector3(0, 0, 1);
} else if(transform.eulerAngles.y == 90) {
direction = new Vector3(1, 0, 0);
} else if(transform.eulerAngles.y == 270) {
direction = new Vector3(-1, 0, 0);
} else if(transform.eulerAngles.y == 180) {
direction = new Vector3(0, 0, -1);
}
for(int i = 0; i <= onBelt.Count -1; i++)
{
onBelt[i].GetComponent<Rigidbody>().velocity = speed * direction;
}
}
// When something collides with the belt
private void OnCollisionEnter(Collision collision)
{
onBelt.Add(collision.gameObject);
}
// When something leaves the belt
private void OnCollisionExit(Collision collision)
{
onBelt.Remove(collision.gameObject);
}
}``` but it kinda works but the moment it touches another conveyor belt and switches to that when it switches direction as well. This makes it ride on the edge of conveyor belt. Also, the items kinda lag on the belts.
fyi there is a SurfaceEffector2D. idk if there is for 3D
direction = transform.up in your Update, then you don't need all the if else statements
Hello everyone , i cant seem to find a solution to attaching a script to a scriptable object. Im finding alot of things online , but none of them are really relevant.
Ive got a scriptable object with a reference to another script but i cannot select it in the inspector when creating a new scriptable object like shown here:
Runebehaviour being just an empty class
is it Serializable ?
oh its not monobehavior
regular class you create with an new() instance , you can't drag a script in a field
Ahh i see. That simple
No way around this? , i was told to try and minimalize monobehaviour scripts
And in this case , the class will never be called by monobehaviour
why do you need the field there in the first place?
Im creating a rune system with diffrent mechanics , so when you make a new rune type , i can choose the behaviour of the rune
Missile runes - choose missile behaviour
Heal rune - choose heal behaviour
etc etc
cant those just be scriptable objects as well?
they are swappable and can run methods
I want them all to be inherited from 1 class - "Rune"
public class BaseBehaviour : ScriptableObject { }
then derive anything from BaseBehaviour you can swap the slots with w/e
I even have the class ready for this exact thing
Sometimes you overthink.
Thanks for the help and thanks for reminding me
If the base Activate method will not have any implementation, then consider making it abstract instead of virtual
This will also force derived classes to implement the method
^ Good tip
In this case theres a couple of things in the activate method , like mana useage
what format does unity store rotations in? i tried doing * Mathf.Rad2Deg, but it still didn't give me the proper camera angles-
Quaternions
easily googlable
no you work with Euler angles
Quaternion to * Mathf.Rad2Deg wouldn't make any sense
maybe explain what exactly are you doing and what it is you expect instead thats not happening ?
Hey, does Resources.LoadAll also load resources from subfolders?
Hello, is there such a thing as an Instance ID for a scene's particular instance?
If so, how would I reference it?
check build index settings
yea unfortunately that's not what I want... i'm hoping for a unique id for that particular instance of that specific scene, not just the general scene index.
afaik there is nothing like that...
like if i load scene 1 once, it has a unique id of 12345... if i exit that scene and load it again, then the next instance might have 12346
is what i was hoping for
i don’t understand how you can have multiple instances of one scene
that’s not an instance
scenes are like macro prefabs
they would be at separate points in time, not at the same time
Just smack a component on your object and generate a unique ID
You can just make your own id
yea i think making my own ID in my GameManager is the way
i'll just increment it each time i load a new scene
thanks guys!
then i’d make a class in charge of changing/loading scenes that can track
because you can’t instance a scene, so there is no instance ID to give it
how is that going to do anything
transform.up is return the green axis of the transform. So if you rotate the object the axis rotates with it. You might have to use transform.forward or transform.right depending on how you do things.
What is the recommended solution for an online multiplayer party FPS supporting up to around 8 people?
Which would be easier for a beginner at multiplayer, and does it matter which solution I choose for using a service like Vivox?
Any would work, such as Unity's own netcode. If Vivox does what you need, then use it?
Im just not sure how Vivox actually interacts with the rest of the game, I'm assuming that it runs independently of the other multiplayer stuff
Does Unity netcode have good resources for learning how to use it and does it have free hosting (at least p2p)?
It's functionality you use on top of your game. You can explore it:
https://unity.com/products/vivox-voice-chat
Yes, look online. Free hosting will never exist.
At least free for up to a limit* like PUN
Yep, for development
Im almost certainly not going to have more than 8 concurrent players
Ok thanks for the info ill look into it
Ever? 🤔
I dont have that many friends lol and i doubt other people will play it
(Im assuming you're talking about the 8 concurrent players thing)
Right, well in the event people do, you will have to pay once you hit limits. So just be aware of that.
Yeah ill figure that out if it happens i guess
that doesn't answer my question
Hello, could someone take fast look at my lighting question said in that channel? I say it here because almost no one watches it... 🤷♂️
#archived-lighting message
don't crosspost.
Hey sorry I wanted to clarify on where to find the logs from the .exe running?
Is this considered a Player log?
If you mean from a built Unity project then, yes
Is your goal to get the world vector from the direction you're facing?
Sorry, I didn't know it was prohibited
Yeah so where would I find that? Is this right?
yes
I mean I just tried this and it works flawlessly
using UnityEngine;
using System.Collections;
public class ConveyorBelt : MonoBehaviour {
public float speed = 2.0f;
private Rigidbody rb;
void Start() {
rb = GetComponent<Rigidbody>();
}
void FixedUpdate()
{
rb.position -= transform.forward * speed * Time.deltaTime;
rb.MovePosition (rb.position + transform.forward * speed * Time.deltaTime);
}
}```
There is just one problem, which is that the moment it touches another conveyor belt going a different direction, it changes directions, making it go on the very edge of the belt. I don't know if using a coroutine would be the best or what.
for some reason, I dont have the file they list there... I have one called Player.log found in
C:\Users\Alex\AppData\LocalLow\DefaultCompany\Game Name\
it appears to be the right file?
yes
ok thanks a ton sir!
So I'm trying to change Scenes when a button is pressed, similar to in Titanfall 2 when you unlock the "Time-Skip" watch. I've made this, but it just duplicates the scenes so many times over and over again and I'm unsure what I'd do to stop that. This is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SwitchReality : MonoBehaviour
{
bool levelLoaded = false;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.F) && !levelLoaded)
{
SceneManager.LoadSceneAsync("SwitchedReality", LoadSceneMode.Additive);
levelLoaded = true;
}
if (Input.GetKeyUp(KeyCode.F) && levelLoaded)
{
SceneManager.LoadSceneAsync("StarterReality", LoadSceneMode.Additive);
levelLoaded = false;
}
}
}
could someone either help me to or provide me with what I may need to correct my timestep as I both checked docs and read this https://gafferongames.com/post/fix_your_timestep/ (after finding it in like the 5th forum) but I still need help ;-;
Introduction Hi, I’m Glenn Fiedler and welcome to Game Physics.
In the previous article we discussed how to integrate the equations of motion using a numerical integrator. Integration sounds complicated, but it’s just a way to advance the your physics simulation forward by some small amount of time called “delta time” (or dt for short).
But how ...
what did you expect LoadSceneMode.Additive to do?
From what I read, it was to make it load in the background, to create more of a seamless switch between the two.
how to check the execution time of the code?
No, that is LoadAsync. Go and read the docs again
anyone here that uses FinalIK? How can I change the weight of IK components with keys in animation?
UnityEngine.Profiling.Profiler.BeginSample();/EndSample()
then check profiler
alright ty
or use Stopwatch
what do you need it for
memory usage
you have memory profiler
i need memory usage of the algorithm itself
i am doing a study
thats why
i need the algorithm itself
Also what do i put in parameters
whatever you want
how do i use this tho?
also thanks for ehlp
they say i need to use system.diagnostics
but nothing is working
you need to add the UnityEngine using directive
sorry idk what u mean
they invalid string, what should i be writing
i am alrd past deadline by like 10hrs...idh much time to read so I am begging to just give me the answer quickly
please
what are you expecting from us here? do you want us to write the code for you? because that won't happen.
not code just this line
i cnat do debug.log
idk how to fix
UnityEngine.Debug.Log
thanks so much man
you have debug in both UnityEngine and Diagnostics
also if the intention is to benchmark the memory usage and time of your code you should ideally be using the performance testing extension for the test runner
https://docs.unity3d.com/Packages/com.unity.test-framework.performance@1.0/manual/index.html
So do normal images just not work in unity 2023
did they make some change to them where you cant set them to sprites anymore
Not a coding question. What's a "normal image"?
Image component
Works the same as it always has, there's been no changes.
Can't drag a 2D (Sprite & UI), Legacy UI, or Default texture type into that box
Raw image works just fine but I don't see why I would need to use raw image..
check again that your texture is actual single sprite
You don't. Show the import settings for the thing you're trying to use.
why in the world does it default to multiple?!
ugh thanks
yeah that is strange for some reason images i drag in default to 'multiple' sprite mode instead of 'single' which is my default in all other projects
check presets
no presets (i've never even seen the feature before)
Hey guys, i just create a form post with my question because its quite lengthy. want to see if anyone here can help me out with my weird issue https://forum.unity.com/threads/physics2d-raycast-is-hitting-the-gameobject-below-the-ray.1518400/
i’m trying to figure out how to best do ground checks, now that I am refactoring everything.
My physics solver places everything at their target destination before I hit simulate. In this case, it would be fine to get grounding state from Contacts / CollisionCallbacks, right?
what are you trying to do
what is the game
an automation game similar to factorio. im trying to put conveyor belts on the ground
okay
what is your Edit > Project Settings > Graphics > Transparency Sort Axis?
there is a lot of code here
i am going to sort of ignore it
i am just checking that you don't have a weird setting there first
0,0,1
okay
what does when i try to spawn a GameObject above an existing GameObject it collides with the one below it thus not spawning a GameObject. mean?
try to rewrite that
so that it makes sense
say what you observe in the debugger
or say what happens
it's clear that you click an empty cell above (in positive y) a game object, and you do not see an instantiation which is unexpected
don't say stuff like collides with the one below it
unless you mean "the ray hits the game object below the clicked cell, unexpectedly, according to the debugger"
when i try to place a conveyor belt above another conveyor belt my raycast comes back as it hit something, even though there is nothing above the existing conveyor belt
why did you choose -Vector2.up in Physics2D.Raycast(_mouseWorldPosition, -Vector2.up, 13f); ?
why are you using the mouse world point?
i got the raycast line from unity documentation
i guess, every line has a problem in CheckIfClickedOnGameObject
what is it hitting?
ima try swaping -vector2.up with vector.forward see what happens
don't try random stuff
ok
why did you choose that?
it's okay if the answer is "i don't know"
i mean, you can try random stuff and blub through this
do you want to do this the right way?
i just copied and pasted what i saw in the unity documentation for raycast, ill link it in a sec
to get the world position of where i clicked so i can correctly place the conveyor belt
How can I catch an IPointerDownHandler event on a UI object that's under other raycasters?
(ie - I want a background to be able to catch this for "cancel" clicks)
only by duplicating and modifying GraphicRaycaster & EventSystem to correctly respect Use and used. clearly the UGUI developers intended to replicate the DOM API's behavior they were copying, but e.preventDefault() is regarded as so baffling, i can understand why they went halfway and never supported the thing you are requesting.
blah
you can step through graphic raycaster and event system, and clearly see that this was something that was intended to be supported
Maybe you have an idea for me. I have this UI with a zillion things in it. I want a button that the user can press to use a boost - but I need their follow up action (ie, where should the boost go). If they click on the playing field, great, since I have pointer down/up events on that object already. If they click anywhere else, though, I need to cancel the particle effects on the boost button.
I don't want to put events on eeeeevvvvverything else and call "cancel boost"
Although at this point I don't see a simple solution.. maybe I'll stick a big black box on the screen (everywhere except the playing field) to capture a cancel click
that will work but only if you have a single clickable area
i usually put something in the back to catch ordinary background clicks
and use a static method to deal with that
for the sake of simplicity
yeah, i do too, but in this case I have to do have all the other things on the UI call cancel too
event system has IsBackgroundClick or something
like buttons, etc
which is when there was nothing that catches raycasts on graphic raycasters
i think for all the raycasters*
Put a big invisible ui image behind everything else. Super simple. I do this every time
I was thinking of getting fancy and putting a check in Update() of the playing field to see if there was a mouseup event but that's just .. sloppy
just expose a callback, add it somewhere in the middle of the click processing
youll get notif and you can edit event
there is a place you can do this, but it still requires extending the event system class
but this doesn't catch pointer downs on other objects with raycast targets though..? or am i misremembering
i don't htink it's possible to avoid extending event system
why would it, if it's behind them?
yeah.. well.. i need it to. 🙂
specifically to expose GetCurrentPointer or whatever it's called.. it's a protected method and you basically want to promote it
put it on a screen space - camera canvas with a plane distance of 1000
and its going to be simpler
then put it in front of them
You definitely don't need to extend event system for this
but then the other objects don't get the clicks.. it's minor but if a user clicks on "use boost" then clicks another button on the UI, that click (which would hit the invisible UI thingy) wouldn't do anything
I'm unclear if you want it to block objects or not
hm... i'm explaining this poorly.. lemme snap a pic, sec
put it in front of objects you want to block, and behind objects you don't want it to block
The 1st "boost" button (the leftmost one with the purple diamonds) is active - it's waiting for the user to click somewhere on the grid. That's fine, I have a grid that handles input just fine.. while the game is waiting for the followup click, particle effects are playing on the boost button
in spellsource i think i throw up a recttransform IN FRONT of everything EXCEPT the battlefield
if I click anywhere else than the grid, the boost should "turn off"
like 4 of them, in order to make a border
in order to create a "cancel zone"
i hear you
(but there's many other valid raycast click handlers on the UI - like the other boost buttons, etc)
so i toggle that on when you're doing a targeted effect
yeah that's what i'll have to consider.. or something like this: (sec, mocking it up)
showing that big honking black thing (with some instructions, I guess) that catches any "cancel" clicks
okay
actually looking at the source
kinda hides my particle effects but i can deal with that
check it now, i just have the bug lol
i didn't do anything about it because on mobile you are dragging
and people who do the click based workflow don't make this mistake
that said you have more buttons on screen
Interestingly the gameobject gets IPointerUp events if you started the click on the object
if i had to implement this now, i would probably extend Button and have it check if it should be suppressed due to a global state
so it goes with UI
i would actually extend the thing i actually use*, which is OnPointerUpAsObservable, which is much easier
aka the ObservablePointerClickTrigger script in unirx
when the boost is turned on, enable the big invisible image that's in front of everything else
otherwise leave it disabled
cancellation works correctly but because it just checks if you have a valid target. a ui blocking shade would also work and would be less invasive code-wise
now that i understand what you are talking about, well, you can definitely click end turn when you are summoning / casting
good enough for now
don't make fun of my placeholder particle fx, i'm a horrible vfx artist
#archived-networking - it depends on your network framework. Most have a concept of "ownership" or "authority" over network objects. Use that.
Is there anyone available to help me in dms atm, doing my best to work on frame independent movement while cleaning up and reformatting my PoC build but I think im fucking something up
just ask your question in the server, no need to ask if anyone is here. very few are gonna want to give free 1 on 1 time
Already having desync issues
Using Unity lobbies, when I join the lobby and ask for the player list the player list is correct
but when the host checks the player list they dont see any new players
alright ^~^ just have a bit of trouble communicating so I didnt wanna drown anyone else out
basically im building a controller to match MMZ's specific movement from 1 - 4
https://pastebin.com/np7gUrt6 (this is the main jump handler) and I think the problem is because im pulsing it on input instead of OT as the state is active
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
but when I apply velocity while the state is active through the state handler OR the timer itself it uh
well
its not happy for sure (I also tried it in the if statement within the timer itself which I thought would have worked but I guess not)
splitting the velocity helped a little but this isnt frame independant which is an issue obviously
im not sure where I should apply the velocity if not on the initial input or during the state or if I just did it wrong
Anybody familiar with unity netcode know why my player list doesn't update after someone joins?
when the tutorial fails to mention important aspects of the thing you're trying to make
I figured it out, I needed to store the wall direction when applying force over time because I was only reading it for the single input frame during the wall jump the way I had it before
there is a unity multiplayer server pinned in #archived-networking you'll find much better help there. You havent shown any code in your last 2 questions so no, no one knows why your list doesnt update
thanks for the link, apparently i need to manually poll the lobby when i want to check for new players
hey all, i'm trying to make a sort of ocean shader that gets a plane and updates it's vertex positions every frame. triangles and uvs are needed, but they can stay the same. both collision and render are needed from this shader, hence why i'm not just doing it on the gpu -
void Start()
{
preMesh = new Mesh() { vertices = GetComponent<MeshCollider>().sharedMesh.vertices, triangles = GetComponent<MeshCollider>().sharedMesh.triangles, uv = GetComponent<MeshCollider>().sharedMesh.uv }; ;
oldVertexArray = GetComponent<MeshFilter>().sharedMesh.vertices;
GetComponent<MeshCollider>().sharedMesh = preMesh;
GetComponent<MeshFilter>().mesh = preMesh;
}
public void Update() {
AdjustMesh();
}
public void AdjustMesh()
{
Vector3[] newVertexArray = new Vector3[oldVertexArray.Length];
for (int i = 0; i < GetComponent<MeshCollider>().sharedMesh.vertices.Length; i++)
{
newVertexArray[i] = new Vector3(oldVertexArray[i].x, oldVertexArray[i].y, oldVertexArray[i].z + physicalWaveHeightVar * Mathf.PerlinNoise((oldVertexArray[i].x * physicalWaveWidthVar) + timeVar * physicalWaveSpeedVar, (oldVertexArray[i].y * physicalWaveWidthVar) + timeVar * physicalWaveSpeedVar));
}
preMesh.SetVertices(newVertexArray);
GetComponent<MeshCollider>().sharedMesh = preMesh;
}```
but every few seconds it stutters the game, i think there's a massive amount of garbage to collect, but i can't call it manually or EVERY frame stutters for a massive chunk of time. there has to be a more efficient way to make new meshes, right? if anyone has any advice lmk!
Just use a vertex shader rather than modifying the mesh every frame.
But the reason you're getting so much GC is because you're accessing .vertices in your loop condition
That creates a new copy of the vertex array every single iteration of the loop
You're also explicitly making a new array every frame. Why?
Just reuse the same array
okay, made it at least 4x as efficient
changed it to one array with a constant int that's based off the length initially, and changed how the sine is calculated to remove the additional array ref
i was also doing this on four ocean planes, now i just project the same mesh onto all four instead of lazily calculating it four times just so it can be prefabbed easily still
I don’t have the code right now but maybe someone can still help: Im working on a top down shooter and i want that when I shoot I want the player to flip either left or right indicated by where the mouse is, so in my shoot code i have an if statement if the player already is in the right direction and if not i call the Flip function. After this I spawn and activate the bullet. The problem is that this when i run the game the bullet gets shot before the character flips.
Don't shoot the bullet before it flips.🤷♂️
Any one know why this won't add labels to my asset:
var mesh = new Mesh();
AssetDatabase.SetLabels(mesh, new string[] { objType.ToString()});
AssetDatabase.AddObjectToAsset(mesh, blueprint);
AssetDatabase.SaveAssets();```
was hoping it would have the label Mesh but it ends up with no labels
Is there a general guideline for how much allocating is bad for a pc game? Im not trying to prematurely optimize but curious at how carefree i should be. I noticed when I was making some damage numbers (player gets hit, number floats up on screen) that my DoTween sequences were allocating like 2kb per use which seems a bit excessive. This could be happening every frame, should I be concerned with this?
Possibly. In the end gc collection is just another thing you need to allocate performance budget for. If you can afford it, hundreds of kbs per frame may be fine, but you would have less budget for other things. It also depends on the GC type. I think incremental is the default now. It means that it would try to deallocate a little bit every frame without affecting the game too much. On the other hand if incremental is not enabled, it's gonna collect all at once every few frames possibly creating a spike.
ill probably just stay with update loop in this case since its easy, really surprised dotween allocs this much
In the code stands that i shoot it afterwords
Perhaps try ImportAsset on that path after you've called AddObjectToAsset and then call SetLabels, see if it makes a difference to have already put the asset in the assetdatabase before calling it
Also, can subassets have different labels to their parent? I'm not that familiar with labels
got it working for sub assets
have to save the database then set labels
cant do it before saving so you basically have to do a double save assets
I don't know if you have to call save for labels--at least, they don't in the docs
would have to try with git 😄
Is there an equivalent for Rigidbody2D.GetContacts in 3D?
Or better question, how do I find all the current contact points for a Rigidbody?
I mean I just want the contacts of 1 specific rigidbody.
is there only a limit of 2 labels per asset?
@quartz folioah you're right you can't apply them to sub assets
what a pain
how can i delete this? i have a state machine set up, and i want this line to be cleaned up.
playerInput.actions["Escape"].performed += _ => pauseMenu.ChangeState(pauseMenu.paused);
i tried changing the + to a -, but that didn't work.
you will need to change the anonymous lambda method to a normal named method in order to be able to unsubscribe it
thanks a lot, that worked
And there was me thinking, 'There's no way he can follow instructions'. lol
only reason i managed to was because i already had that answer open
i just wanted to see if there was another fix
since it made me rewrite some stuff 💀
using lambdas is never a good idea for subscribing because you should always be able to unsubscribe
i didn't know you couldn't unsubscribe with lambdas
Hey! Not sure in which channel I can post but I have some troubles understand how to implement a file read + image uploader within Unity. I'm trying to achieve 2 things, read a csv file which I already did using a drag and drop feature from github, but it crashes too much without any info so I'm trying to replace that. Secondly and it's the part I have no idea how to achieve, a way to upload an image in the game and save it to some database; I managed to find some repos where you can use an image as a texture in game, but couldn't find any info on how to upload this image somewhere that I can then link to the player and reuse whenever he opens the app again
UnityWebRequest + System.IO.File using Application.persistentDataPath
Yeah but that's to save locally, I'm trying to find a solution for cross platform
you mean if the user is cross platform?
Yes, most of users will probably have the game on both mobile and pc, so I'm trying to save consistenly between both
You want to send the image to a database?
Yes
Already using websocket+mongo for all the data, but images I'm not sure how to do it
Read its bytes and depending on your database, convert it to the appropriate type
does mongo support blob data type?
I'm not too familiar with mongodb tho
Apparenlty mongodb uses BSON to store large binary files
that will do
So when the user uploads the image via pc or mobile I'd need to convert it to bytes and save to the db? And then when login back in either I'd need to convert back those in a texture?
yes, exactly
Okay nice, thx a lot, I'll try to understand how it works!
you could still store it locally, then check if not exist local get from db, to cut down on overhead
If you do that you should prob store a hash to know if the one in the DB is different
crc
Makes sense, I'll start with uploading/storing/loading and I'll add this on top after
Are you aware of any repos or asset that is able to manage standalone, mobile & webgl?
database?
No for the unity side, to upload the image/file in the first place
UnityWebRequest
Does it handle like opening the file explorer?
no, there is a free asset on the store that does cross platform File panel at runtime
Yeah this one doesn't handle webgl, I'll start with this one and find another solution for webgl, thx again
You'll probably have to do something with JavaScript
webgl is not gonna be fun, you'll need to dive into Emscripten in order to transfer the info between JS and Unity
If I take something like this: https://assetstore.unity.com/packages/tools/integration/simple-file-browser-for-webgl-234993
saving the data to the db is completely separate right? I can still have the same logic that standalone/mobile for saving it?
sure
guys i have a problem
while having the math for distance in vector2 between object and plane, i cant get the math to get object position in front of the plane
and keep in mind that i have to avoid the parent and child feature
rotate the offset and set the box's position after rotation
how do i do that? plane.vector.forward?
https://discussions.unity.com/t/rotate-a-vector3-direction/14722/2
there should be other easier ways for doing that
http://unity3d.com/support/documentation/ScriptReference/Quaternion.AngleAxis.html vector = Quaternion.AngleAxis(-45, Vector3.up) * vector; That's a general case. For rotation around a world axis, it's faster/easier: vector = Quaternion.Euler(0, -45, 0) * vector; For (1,0,0), this results in (sqrt(.5), 0, sqrt(.5)), not (.5,0,.5), by the ...
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnityEngine;
public class MovementController : MonoBehaviour
{
[SerializeField] private float rotDegreeClamp;
[SerializeField] private float jitterBuffer;
[SerializeField] private float rotSmoothing;
private Quaternion gyroAttitude = Quaternion.identity;
private Quaternion prevFrameRot;
private void Start()
{
Input.gyro.enabled = true;
}
void Update()
{
gyroAttitude = Input.gyro.attitude;
Quaternion rotChange = Quaternion.Inverse(prevFrameRot) * gyroAttitude;
//Quaternion clampedRot = Quaternion.Euler(gyroAttitude.eulerAngles.x, gyroAttitude.eulerAngles.y, Mathf.Clamp(adjustedZRot, -rotDegreeClamp, rotDegreeClamp));
if (Mathf.Abs(rotChange.eulerAngles.z) > jitterBuffer)
{
Quaternion zGyroRot = Quaternion.Euler(0, 0, gyroAttitude.eulerAngles.z - 90);
transform.rotation = Quaternion.Slerp(prevFrameRot, zGyroRot, rotSmoothing * Time.deltaTime);
Debug.Log("jitter: " + rotChange.eulerAngles.z);
}
}
private void LateUpdate()
{
prevFrameRot = transform.rotation;
}
}
I am trying to compare the rotations of my object on the prev and current frame in order to do some basic noise filtering for my gyroscope controller however the value I'm getting are ranging from 0 - 360 depending on the rotation and has no correlation to the difference between frames at all. I was under the impression that I could compare the rotations using "Quaternion rotChange = Quaternion.Inverse(prevFrameRot) * gyroAttitude;" where Quaternion.Inverse(A) * B would give me the local space rotations and vise versa world space so I assume the order is at least correct
it also starts off at like 20 degrees even when my phone isn't plugged in and theres nothing that should influence the rotation but I dont know lol
ok, trying
Is there a way to access the animator nodes through code
Several. What do you want to do with them?
That would have been a better question to ask. This is the way to do that: https://docs.unity3d.com/Manual/AnimatorOverrideController.html
ty
And how to use it in code directly as well: https://docs.unity3d.com/ScriptReference/AnimatorOverrideController.html
wdym "doesn't work"
no, it should work
I kept getting this error, although I coulnd't find the instance that is null
where you new the dictionary?
unity editor bug
just i misread didnt notice it is editor error, so restart the editor should solve it
mb
you still haven't told us what 'this' is
i added keyvalue to the dictionanry
but out of method scope there is no keyvalue in dictionary
the dictionary count = 0
have you checked the allcurrencydefinition first?
yye, ichecked it
why are you calling a static instance field? you should be retrieving by GetInstance()
you are bypassing any safeguards on a singleton
have you also checked the dictionary count after the foreach?
yes
yes
ssem like the keyvalue is added after foreach
i call the GetGold Method after FlecthCurrencies done
i would find all PlayerXXXX.Clear() first
there is no PlayerXXX.Clear except the one in FlectchCurrencies
how about remove()? i think only those two methods can reduce the count of dictionary
that dictionary should probably only be altered via functions of the class that holds it
which should make it easy to locate changes
yeah
i found it
the singleton object is destroyed when load newscene
thank all uu guyss
you should take a stock singleton class
Hey everyone,
In this tutorial we cover the controversial SINGLETON! Many people will hate me for teaching this but I think it is a useful tool to have, or at least know about when programming. Hope you learned something and thanks for watching!
Example video of singleton that exists in scene (Canvas Manager):
https://www.youtube.com/watch?v=v...
I'm making a android game
If I have a screen space-overlay UI with a image that covers the entire screen (which is used to look around)
Then I'm unable to interact with world space UI
I want to interact with world space UI first then screen space
Thank you for the reply!
sorry for late response I've been away. I ended Up solving the issue with Func ty!
are collision callbacks an acceptable place to be doing ground checks?
now that I am refactoring, i am thinking that it might be
look at the sorting order and layer
guys I know there's a way to only show some attributes in the editor based on some value (e.g. melee or projectile ability) but idk what it's called. do you guys know?
SkillTreeAbility (The one thats dragged)
[RequireComponent(typeof(Image))]
public class SkillTreeAbility : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
{
public Transform ParentAfterDrag = default;
public void OnBeginDrag(PointerEventData eventData)
{
ParentAfterDrag = transform.parent;
transform.SetParent(transform.root);
transform.SetAsLastSibling();
}
public void OnDrag(PointerEventData eventData)
{
transform.position = Mouse.current.position.ReadValue();
}
public void OnEndDrag(PointerEventData eventData)
{
transform.SetParent(ParentAfterDrag);
transform.localPosition = Vector3.zero;
}
}
SkillTreeSlot (The one that does the on drop logic)
using UnityEngine;
using UnityEngine.EventSystems;
public class SkillTreeSlot : MonoBehaviour, IDropHandler
{
public SkillTreeAbility HoldingSkill;
public void OnDrop(PointerEventData eventData)
{
if (HoldingSkill == null)
{
HoldingSkill = eventData.pointerDrag.GetComponent<SkillTreeAbility>();
HoldingSkill.ParentAfterDrag = transform;
HoldingSkill.transform.SetParent(transform);
HoldingSkill.transform.localPosition = Vector3.zero;
}
}
}
I have problem with dropping the TreeSkillAbility into Slot
I tried debugging, and only the OnEndDrag is being called
All of the children are on the same canva
it does looks like the hierarchy ability (draggable) needs to be on top, but i dont think thats how its supposed to work
if i change the code from LastSibling to first, it does work, but only once like ???
like this, only change is the hierarchy order
I don't think it's build into Unity, but google 'HideIf' for a custom package. Also, your melee ability shouldn't have the same attributes (fields) as a projectile class. You could look at this package: https://github.com/mackysoft/Unity-SerializeReferenceExtensions
oh damn I think this was what i was looking for a while ago
lmao thanks man
Is netstandartd2.1 the correct target framework when using Unity 2022.3.3f1? im using a shared library but Im unable to access the classes from it. If I am copying the dll file I get this error message.
what is your goal? you are actually referencing a later version of that attribute, not that it matters functionality wise
you can ignore assembly version verification and that might be enough
this table is the assembly versions.
Target Framework Assembly Version
.NET Framework 4.5 4.0.0.0
.NET Framework 4.5.1 4.0.0.0
.NET Framework 4.5.2 4.0.0.0
.NET Framework 4.6 4.0.0.0
.NET Framework 4.6.1 4.0.0.0
.NET Framework 4.6.2 4.0.0.0
.NET Framework 4.7 4.0.0.0
.NET Framework 4.7.1 4.0.0.0
.NET Framework 4.7.2 4.0.0.0
.NET Framework 4.8 4.0.0.0
.NET Core 1.0 1.0.0.0
.NET Core 1.1 1.1.0.0
.NET Core 2.0 2.0.0.0
.NET Core 2.1 4.6.0.0
.NET Core 2.2 4.6.0.0
.NET Core 3.0 3.0.0.0
.NET Core 3.1 3.1.0.0
.NET 5.0 5.0.0.0
.NET 6.0 6.0.0.0
.NET Standard 1.0 1.0.0.0
.NET Standard 1.1 1.0.0.0
.NET Standard 1.2 1.0.0.0
.NET Standard 1.3 1.0.0.0
.NET Standard 1.4 1.0.0.0
.NET Standard 1.5 1.0.0.0
.NET Standard 1.6 1.0.0.0
.NET Standard 2.0 2.0.0.0
.NET Standard 2.1 2.1.0.0
you can configure your project to actually target netstandard21
Im using a backend and I want to sync the models. The issue is that the backend is running on .net7 and im not able to access the library
is this a mod?
what do you mean access the library?
you can turn off assembly version checking. it's called something like that
Ill try that
I have a asp.net core backend and want to use the same models (Dtos) inside both applications
if(Input.GetMouseButtonDown(0)){
var ClickedPoint = Input.mousePosition;
Color32 CheckColor = texture.GetPixel((int)ClickedPoint.x, (int)ClickedPoint.y);
//Debug.Log(CheckColor);
sprite.color = CheckColor;
foreach (Province p in provinces)
{
//Debug.Log(p.MyClickableZone.MyColor);
//Debug.Log(p.name + " "+ DifferenceInColors(p.MyClickableZone.MyColor, CheckColor));
if (DifferenceInColors(p.MyClickableZone.MyColor, CheckColor) == 0)
{
p.OnLClick();
}
}
}
heres the code that gets the clicked color and refers it back to the provinces, with their each assigned colors
the issue is, because Input.mousePosition is screenspace, if I change what the camera sees, it wont change what Clickedpoint is
(this code works great btw)
is this texture being displayed by an Image component?
or is it something in the world, on a renderer?
It is, but it doesnt need to be for this, ie, the code will work even if it isnt
I'm using a sprite which is inconsistent, but thats only because a worldspace canvas wasnt showing up on the second camera for some reason
I tried using a rendertexture, but for some reason the colors got offset weirdly, and that didnt work
perhaps you had the wrong color format
You can use https://docs.unity3d.com/ScriptReference/Plane.Raycast.html to figure out where you clicked on a 2D plane
But if this is an orthographic camera looking directly at the sprite, then you can skip that
this would only be necessary if you had to deal with perspective
it is
actually, I wonder if you can just raycast to it and get the UV coordinate directly
I'm thinking about making a singleton class to help me orchestrate things at different points of a frame. My idea is to make public event Actions like OnEarlyFixedUpdate, and invoke in a script with high priority. Would this be bad if the action winds up having a lot of read/write?
I know you can do that for a mesh collider
I don't know if that would work with the mesh that a sprite renderer creates
could I just use a boxcollider?
this would be the magic
Failing that, I would convert from screen-space to world-space to the sprite renderer's local-space
You'll then just need to scale the result correctly
I don't do a lot of 2D so I'm not sure what that scale would be off the top of my head
you'd divide by the sprite renderer's local-space size
(or just go to world-space, subtract the world-space position of the sprite renderer, and then divide by the world-space size of the sprite renderer)
math
you mean, if you subscribed and unsubscribed a lot?
ill work on it, getting a better idea of what to do tho
Converting to local space would be the best, because it would correctly handle a rotated or scaled sprite renderer
yes
Unity doesn't have a LateFixedUpdate, or EarlyFixedUpdate, or AfterCollisionCallbacks.
If you use Coroutine with IEnumerator with yield return WaitForFixedUpdate, it will execute after collision callbacks.... of the NEXT frame
I was looking into this at one point
Entities makes this super easy. You can arrange systems/system groups however you want
I remember finding some little bits and pieces that looked relevant, but not really getting anywhere..
would a boxcollider work or would it have to be a meshcollider
Texture Coord is only for MeshCollider
A mesh collider would be necessary for texture coordinates, yes
ok
I'm not sure if you could use this with a sprite renderer
i should just go look lol
doesn't seem like it
the goal is to get the UV coordinate you clicked on, btw
in case you're joining this late
I could always just make it a cube
I dont think that would have any issues? or that could have a lot of issues
Use a quad mesh and MeshCollider
then you can just use TextureCoord
(instead of SpriteRenderer)
ok
this worked, although it does introduce the issue of clicking outside of the bounds will cause an error
but that shouldn't be too hard to fix
oh yeah, of course!
should've thought of that lol
I get around this by making a fake UI image object at the top of the hierarchy as this way it will always be rendered on top. When you drag, you'd enable that fake UI object and temporarily apply the image data to it.
im unsure why the scaling is a little off, but I can cap zooming out at such a point where it woudlnt get bad
or something
GetComponent<Image>().raycastTarget = false;
thats what fixed it for me i think, probably raycast target was a bit off
Oh, you're talking about the raycast not going through the image
and on enddrag switch it on
But I notice your slot elements are being hidden too when you drag over a higher ordering, so you may run into this issue too.
oh yeah, thats 2nd time when i did change the transform to first sibling
to showcase the different behaviour (still unexpected)
last sibling should often be rendered on top (but will know your fix at top of my head if i will encounter that)
Another fix is to use multiple canvas too as then you can sort it directly with layering ordering
unless that didnt work
it might not have
how can I change the aspect ratio of a camera?
wait nvm im just dumb
Anyone able to DM. I have a question about something Im working on
dont dm, just ask your question here
SC allowed?
Ok so I need help with the middle line. I need to know how to get it to work because on the Unity Docs it says there is an out but when I try it, it says no out override
send error
I cant get a SC of it. When I click screenshot overlay disappears haha
Ill tell you what it says
Whatever currentDrawing is doesn't have a method signature that matches what you used there
please check the docs and only use methods/overloads that exist
Argument 1 may not be passed with the 'out' keyword
??????????
at the bottom of visual studio, there should be a box with an x, that should have all your errors
ahaaaa
so you need something else passed in before passing out
missing form your description is qhat type currentDrawing is - the error will say it too
currentDrawing is a line render
What do I pass in? the docs doesn't say to pass anything in
ok well one problem here is you haven't actually initialized your array
hover over the function, it should say what it takes
out modifier doesnt require you to initialize the variable
yea I didn't think so. I tried it a few different ways and idk lol
https://docs.unity3d.com/ScriptReference/LineRenderer.GetPositions.html
what i have searched
It does in this case because
the docs are wrong
the Vector3[] version isn't with out
because Vector3[] is already a reference type
the solution is:
- initialize the array
- remove the
outkeyword
the fact they used out in the docs is a long running error
oh it assumes you pass a allocated buffer into it
it makes sense for NativeArray but not for the managed array
I notice a lot of errors in the docs lol
usually I can find proper way online but couldn't find anything about this.
just read the overload method signatures in your ide
Vector3 results = new Vector3[myLineRenderer.positionCount];
myLineRenderer.GetPoints(results);```
^ better to reuse an array though
but this will work in a pinch
Thank you
i've defined this in the editor, but the following code returns inputAction as null:
private class StateKeybinds
{
public InputActionReference inputAction;
public UnityEvent OnActionEvent;
public StateKeybinds()
=> inputAction.action.performed += InvokeUnityEvent;
public void InvokeUnityEvent(InputAction.CallbackContext context)
=> OnActionEvent?.Invoke();
}```
[SerializeField] private List<StateKeybinds> stateBinding = new List<StateKeybinds>();
ignore the weird framework i have going on-
the following code returns inputAction as null
What do you mean by this? How are you checking?
i added a breakpoint
where
=> inputAction.action.performed += InvokeUnityEvent;
inputAction returned as null upon creation
I would guess that you're calling this on a wrong instance of StateKeybinds then
e.g. not the one from the screenshot where you have it assigned
Show the full stack trace where it's null
Hey, I need some help. I am trying to use Editor scripts to create gameObjects using
UnityEngine.Object cellobj=AssetDatabase.LoadAssetAtPath<UnityEngine.Object>("Assets/Prefabs/Blank Path.prefab");
var attr = cellobj.cell_attr;
cellobj.cell_attr=new_attr;
Cell newCell=PrefabUtility.InstantiatePrefab(cellobj) as GameObject;
The cellobj has some attributes inside in an attached separate Cell script file. I need to modify some of these in the Lines of code in between making UnityEngine.Object and instantiating the object as a Cell.
But it gives me an error
Object' does not contain a definition for 'cell_attr' and no accessible extension method 'cell_attr' accepting a first argument of type 'Object' could be found (are you missing a using directive or an assembly reference?)
Can I modify this objects copy of the Cell script variables or access the cell script variables? Or can you suggest some alternatives?
Seems quite straightforward
You should also probably use LoadAssetAtPath<GameObject> to make your life easier as well
You have UnityEngine.Object cellobj
so it should be pretty obvious that cellobj.cell_attr doesn't exist
you would need to get the actual component where the cell_attr field lives
hint: GetComponent is a thing on GameObject
hello
Thanks a lot.
Isn't the gameObject the instantiated object
The prefab root object is a GameObject
the instantiated GameObject is ALSO a GameObject
changing the type you use in LoadAssetAtPath will make this clearer and easier to recognize in your code, and avoid you having to do a cast
so i should make a gameObject and then when instantiating it creates another copy of it
ah thanks
You aren't "making" a GameObject, just defining your reference as a GameObject reference
ah
Even though SceneView.lastActiveSceneView does not return null, when I open a project for the first time, SceneView.lastActiveSceneView?.camera returns null. Therefore, SceneView.GetAllSceneCameras()'s length returns zero for once. I just hook a method to SceneView.lastActiveSceneViewChanged (Action<SceneView Previous, SceneView New>) for those checks i said above.
How do i get the latest active SceneView Camera at the first opening of the Project properly?
I investigated the problem. Seems its about the lifecycles. I will try some kind of "Initiator"
Unity netcode:
How do I use the PlayerLeft lobby event? It returns a list of ints for the players who left, but how am I meant to use ints to represent players?
PlayerJoined gives me a normal player object
how can i set the eventSystem.firstSelectedGameObject during runtime?
like, i can change it, but the Event System doesn't update accordingly-
so all the UI just doesn't react
doesnt Selectable have Select() method
this i mean
if you need to select something, use the selectable's Select method and dont worry about First Selected
so like Button.Select()
thank you unity very cool
its 2pm here
theres not even dark mode for unity docs
wait yall dont draw yer shades all day ?
i used to but then i couldn't sleep ever
nah dark mode extensions are shit
i think opera has a built in dark mode thing anyway
wish unity docs had theme like .net
bump
there is something like an actorId value on a list of player objects you could iterate in unity, correct?
that's all they are
Agreed.
why is #archived-networking in simulation category 
idk but the NGO server is pinned there, its more active
some of these categories dont make sense
'active'
and then nothing for over 10 minutes now
so they probably dont know the answer
people do have stuff to do
The guy that responded to you in there also really knows what hes talking about.
He literally helps everyone in that server
yeah i would hope so hes the mod
well if he doesn't know the answer to that then im fucked
shouldn't be this hard to just to tell when a player leaves and to put a message in the chat that "this player left: "
you already have an event for that tho
wym
Oh you're talking about Lobby not the game session
this is the only thing that i've found and it just links me back to the docs i was already reading
please god dont make me have to post on stackoverflow
maybe if the docs weren't so shit 😭
its not the docs are shite, its the complexity of the problem at hand
multiplayer isn't for any entry level
Maybe it's the player index? I'm looking at the docs rn, and the PlayerJoined event gives off a collection of LobbyPlayerJoined, that struct contains an int representing "The index the player joined at"
what makes you think im at entry level?
You might need to find a player by that index, which means you need to store them in some list
because you're here asking about mutliplayer xD
this is just my first time using unity netcode, and im finding the resources to be insufficient
its all good I'm pretty new with netcode too
well to be fair it is more coding related than multiplayer
exactly my point
Agreed the docs page on this could use more info on what that integer is
it fits in both categories but feels more like a coding question to me
yeah sorry I never used lobby I just know in NGO you get uLong for player ID
so int threw me off
The integrated docs (Intellisense) doesn't have more info than the docs I guess
hm, so how would I use that? lobby.Players[index]? but that seems wrong because the players would've already changed
no theyre basically just naked List<>s
Nah like the event itself, if you hover over it it might have a more extensive description
no docs
And for finding it, given that the indices do NOT change as players leave and join, you'd need to store a list of them in a Dictionary (?) and index that
im assuming im just doing this wrong then since not even the mod on that server knows how to use it
i havent tested it, no
Dude still couldn't find what is the issue ._.
Idk how you test Lobby multiple ppl, but in ngo you can do a Debug.Log of the clientconnect and get their info
using ParallelSync for multiple client testing
Okay I'm drilling down the documentation and I found this thing (in ILobbyEvents.Caalbacks.PlayerLeft)
So it's indeed stored as indices, who designed that?
And most importantly were they high when they did it
lmao clicking the "See ApplyPatchesToLobby" leads to a 404
nicee
At least the naming conventions are respected unlike the majority of the codebase (have you seen Unity.Mathematics lol)
yeah working with splines package is a pain xD
why does it use IDs instead of player objects ughh
Not even player IDs that would be too simple, but their position in the lobby however it's stored
reference types across the wire
time to test
you funny
could give player ID
its all about efficency and speed on networking
how is an index any different than a playerID
i dont see why i cant do that either. i mean i can do GetPlayers() and then get all of the player objects
private bool ValidatePlayerName()
{
var myName = GlobalClientData.PlayerName;
return !currentLobby.Players.Any(player => myName == player.Data["PlayerName"].Value && player.Id != AuthenticationService.Instance.PlayerId);
}
this works fine
idk I just know if there are custom objects its usually a struct to send over the wire
but again Im speaking from NGO idk how different Lobby is
but yeah objects arent ideal over value types on wire
now its spamming warnings 👍
well now interest is peaked.. I'm gonna install lobby and play around
how does execution order of event functions work between update/fixed update? I’m confused by the diagram in the manual (https://docs.unity3d.com/Manual/ExecutionOrder.html)
manual makes it sound like OnDestroy etc might not get called after FixedUpdate and before Update
wouldnt that be the end of the frame?
to be clear, fixedupdate and update run on totally separate frames, right?
yeah ofc
making sure
I assume you've seen this diagram before yes ?
https://docs.unity3d.com/Manual/TimeFrameManagement.html
hold up, do they run on different threads?
😅 wish i knew
because that’s a pretty big deal
does unity even doing anything thats not on the main thread?
not by default
i was working under th assumption that there is one main thread that evaluates either an Update or FixedUpdate frame, and swaps between them based on current time
thats what i thought tbh
I think theyre updating stuff to be multithreaded but idk what
something something burst
i’m just dealing with object destruction, and want to orchestrate everything properly
Now that I have manual simulation, I have a lot more power to fuck with LateFixedUpdate
LateFixedUpdate is a thing ?
only because I have my own physics system
ohhhlol
I can call delegates at different stages of the process.
it is indeed players[index]
they could've at least named the int 'index' or something
I'm just tryina save up for havok 😔
i thought havok was free
you need Pro license
oh, so free for me lol
:\
like i can call delegates right before solving, right after collision callbacks, etc
student moment
that will be over soon xD
in like 6 years
ok so wtf happens when the player leaves? The lobby slot for that becomes null and it's kept that way until someone else joins? It's like an array isn't it, the lobby is fixed size
I thought they are downgrading accounts and students would be same tier as personal no ?