C
C#2y ago
.fegan

❔ Help with unity line render

OK OK so i have an issue i made myself a grappling hook and well the line renderer isnt appearing or spawning yk
33 Replies
Buddy
Buddy2y ago
Please use $paste
MODiX
MODiX2y ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Buddy
Buddy2y ago
Easier to see code
.fegan
.feganOP2y ago
BlazeBin - chvbbswgcrml
A tool for sharing your source code with the world!
.fegan
.feganOP2y ago
does that help??
RubyNovaDev
RubyNovaDev2y ago
What is the exact issue you're seeing? are you getting an exception/
.fegan
.feganOP2y ago
there is no like issues its js not appearing when im grappling onto an object
RubyNovaDev
RubyNovaDev2y ago
I see hmm Ok
.fegan
.feganOP2y ago
its not rlly spawning either
RubyNovaDev
RubyNovaDev2y ago
have you confirmed that DrawRope is getting past the early return?
.fegan
.feganOP2y ago
no how lmao im new to this ngl
RubyNovaDev
RubyNovaDev2y ago
assuming you're using Visual Studio 2022, there is a debugger built in you can set a breakpoint and just have a look
.fegan
.feganOP2y ago
how do i set a breakpoint?
RubyNovaDev
RubyNovaDev2y ago
Use breakpoints in the debugger - Visual Studio (Windows)
Learn about breakpoints, one of the most important debugging techniques. The article covers breakpoint actions, tracepoints, conditions, and much more.
RubyNovaDev
RubyNovaDev2y ago
this can explain it better than I can, methinks 🙂
.fegan
.feganOP2y ago
where do i put the break point??
RubyNovaDev
RubyNovaDev2y ago
where you want the code to pause so, on the if statement with the early return I'd imagine or maybe after if its being invoked every frame
.fegan
.feganOP2y ago
here
.fegan
.feganOP2y ago
.fegan
.feganOP2y ago
?? im getting this now
.fegan
.feganOP2y ago
RubyNovaDev
RubyNovaDev2y ago
ah the index is out of bounds the game will stop working as you expect once an exception is thrown
.fegan
.feganOP2y ago
what u mean
RubyNovaDev
RubyNovaDev2y ago
C# angy when you play the game because you're doing something it can't recover from basically
.fegan
.feganOP2y ago
so how do i fix that?
RubyNovaDev
RubyNovaDev2y ago
does the line renderer not have a way to just add a position as opposed to setting one? alternatively you can just set indices 0 and 1 to be Vector3.zero
.fegan
.feganOP2y ago
where?
.fegan
.feganOP2y ago
.fegan
.feganOP2y ago
it does
RubyNovaDev
RubyNovaDev2y ago
ehhhhm at this point I would need to basically have the project in front of me and debug it myself I think which I uh well don't really have time to be doing, understandably
.fegan
.feganOP2y ago
all good ill try figure it out myself
RubyNovaDev
RubyNovaDev2y ago
my advice is basically just inspect via the debugger see what you can find out what's up
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server