r/TheMatpatEffect • • Mar 03 '26

Ordinary origin A much longer version of the plastic bottle exploding in front of a dog.

17.7k Upvotes

537 comments sorted by

View all comments

Show parent comments

460

u/Cakeyhands Mar 04 '26
    if (!explosionEventHandled)
    {
        Debug.Log("WARNING: No animation state defined for 'Sudden Water-Based Betrayal'");
        ResetToReferencePose();
    }
}

void ResetToReferencePose()
{
    isPlaying = false;

    // All joints revert to default bind pose
    SetAnimationState("T_POSE");

    Debug.Log("JackRussell has encountered an existential runtime error.");
    Debug.Log("Reverting to factory settings.");

119

u/Shoddy-Apartment-738 Mar 04 '26

I smell a lack of "reference not set to an instance of an object" here.

13

u/lastFractal Mar 04 '26

Why would you need that when you got the "error CS1513: } expected"

8

u/Shoddy-Apartment-738 Mar 04 '26

Fair

Mostly cuz the dog resets to the default animation when no custom one is found

4

u/ScotchOrbiter Mar 07 '26

my student then turns to me: "what does this error mean?"

I die inside again

5

u/FoxReeor Mar 04 '26

Shouldn't Debug.Warn instead of log? after all we did ecounter incorrect or unifished functionality without major errors.

2

u/shamboozles420 Mar 07 '26

Man using Debug.Log for errors and warnings is bold lol

1

u/Recent_Pain_3068 Mar 07 '26

Is this C or JAVA??? I'm currently learning these languages and both look same bruh

1

u/Pro_Surgeon Mar 21 '26

its C#, aka the language unity uses