#show me what components are on the
1 messages · Page 1 of 1 (latest)
please show all of the components on the prefab
Oh yeah there is more GO
and the other objects that are part of the prefab?
And the parent?
it's the prefab
It can have components on it
why would the spawnerscore object need a rigidbody and scroll script
No it adds points
Isnt that the score adder
sure but it also has a scroll script and rigidbody on it for no reason at all
without those it wouldn't move
why does it need to move?
oh, you probably move the individual pipes instead of the entire object don't you?
remove the rb and scroll script from all of the pipes and put those on the root gameobject
Ok but what does the base of the prefab have for components
oh ok
It has at least a transform
Send screenshot please
now I moved the rb and scripts to it
Ok send the screenshot, please
Cool
now put this in your SpawnObject method of the spawner script:
Debug.Log($"Spawning object from {name} - {GetInstanceID()}, time between: {timeToSapwn}"); and show what all it prints
Alroght what is spawning your object
^
and you're still seeing thousands of pipes spawn every second?
no
then wtf are we doing?
show the PipeScroll script
that's the pipe spawning one
oh sorry
is there a way to convert double to float?
because I think that will fix it
why are you using double in the first place? just use float
was this actually a compile error the whole time?
yes because 0.1 is a double. f is for float
oh ok
you're literally using a float literal 2 lines directly above
I'll test
Copy pasting tutorials without changing stuff is th3 bane of anyone trying to learn lol
I didn't copy and paste
which is prob why it went so badly lol
making that change would not have changed literally anything though unless the issue was a compile error (which it clearly was not since you entered playmode before)
Yep it works
You copy pasted with your eyes
i wanna know what you really changed to make it work. because changing the variable type from double to float would not have changed anything about the behavior
no it was also the prefab
because I was getting the prefab as the component when it didn't have the script
the children did
right but you changed that before then you still had the issue where it wasn't speeding up and you didn't show any errors in your console so that wouldn't have been the issue at that point anyway
yeah sry I fixed them myself :I
fine then, keep your secrets i guess
because I understood some things but not others
