Forum begins after the advertisement:


Canvas bugged.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #11658
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    This happens like few days ago making my Canvas unable to be showed pretty much bugged. I managed to fix most of it but my inventory had an issue.

    Error code

    How do i fix that?

    Also there’s issue with the cabbage being unable to pickup. Its not rendered on the player head, nor registered in the inventory after picking up the invisible cabbage, however the cabbage on the farmable area disappear.

    #11659
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Okay it seems that i managed to fix the issue, now its the second bug where the cabbage thing.. hmm

    #11661
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Hi Sync, are there any errors that appear on your Console when you harvest the cabbage?

    You can also have a look at Part 17 of the series, where a couple of bugs are addressed in the first part: https://blog.terresquall.com/2022/12/creating-farming-rpg-in-unity-part-17/

    #11662
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    It could be either a UI issue or the Item not registering.

    When you pick up the cabbage in the scene, check InventoryManager in the Inspector under the ItemSlots array. Do you see the Cabbage ItemData in any of the slots? If yes, the issue is somewhere with the rendering of the UI.

    If not, check the Cabbage prefab. Do you have the Cabbage ItemData assigned?

    #11667
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Okay i checked, it seems that when i harvest the cabbage it just disappear. Its not added to the UIManager either. If i have 5 at cabbage in the inventory, it should hold one on the hand when i harvest, 1 cabbage would be on Item Hand Slot and i middle mouse button it will keep to inventory adding the 5 cabbage i have to 6, but it seems that its not adding up. Weird.

    #11689
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    Can you take a screenshot of what InventoryManager looks like in the Inspector?

    #11729
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    I uploaded a post, not sure if its uploaded or not.

    InventoryManager

    Got this error at Part 15 ending.

    Part 15

    Moving room room to farm leave this error.

    #11731
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Error: duplicate reply detected; it looks as though you’ve already said that. It may seem that theres an issue where when i upload picture it being hidden or something where i am unable to see the post.

    #11732
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Hi Sync,

    Can you upload your images onto Imgur instead? https://imgur.com/upload

    The forum blocks links if you put too many of them together in a post, as that makes the post looks like spam.

    #11735
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Heres my InventoryManager

    View post on imgur.com
    #11736
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Heres the error after i communicate with ben or jeff

    View post on imgur.com
    #11737
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Heres the error when i enter town from home

    View post on imgur.com
    #11749
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    Something is not set.

    You can double click the error to get to the line where the NullReferenceExceptions are occurring, and see which variable isn’t set, and then trace it from there.

    For instance, it looks like in the case of the InventoryManager, itemSlotor inventoryArray is unset in the StackItemToInventory function.

    In the case of the Characters, check if characterData is set.

    #11728
    InoXtiC
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Heres the InventoryManager

    Heres the InventoryManager

    Theres this error at Part 15, ending part.. whats wrong here?

    Part 15 ending part

    There are many issue i encounter so far such as, going from farming to home would have error

    Like this I think its the load time of my computer. Which i am unsure about.
    #11851
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Hi InoXtic,

    Sorry that the forum is flagging your message as spam. I’m looking into it. In the meantime, you will need to avoid posting too many links on your post, as it will cause our anti-spam software to falsely flag it as spam.

    NullReferenceException error

    For the NullReferenceException, look at line 52 of your InteractableCharacter script. These exceptions are usually caused when you try to access a property that is not there. For example, the rb.velocity line below will cause a NullReferenceException if GetComponent<Rigidbody>() fails to find a component:

    Rigidbody rb = GetComponent<Rigidbody>();
    rb.velocity = new Vector3(5,5,5);

    This is because rb will be null if the first line fails. Hence, the code resolves to null.velocity. Below is a video explaining more about NullReferenceException errors:

    Entering town error

    For the error when entering town from home, you can double click on the error to show the line of code that is causing the error. Then just do a check to make sure that variable is not null. Something like this:

    public void OnLocationLoad(Scene scene, LoadSceneMode mode)
    {
            //The location the player is coming from when the scene loads
            Location oldLocation = currentLocation;
    
            //Get the new location by converting the string of our current scene into a Location enum value
            Location newLocation = (Location) Enum.Parse(typeof(Location), scene.name);
    
            //If the player is not coming from any new place, stop executing the function
            if (currentLocation == newLocation) return; 
    
            //Find the start point
            Transform startPoint = LocationManager.Instance.GetPlayerStartingPosition(oldLocation);
    
            if (playerPoint == null) return;
            //Disable the player's CharacterController component
            CharacterController playerCharacter = playerPoint.GetComponent<CharacterController>();
            playerCharacter.enabled = false; 
    
            //Change the player's position to the start point
            playerPoint.position = startPoint.position;
            playerPoint.rotation = startPoint.rotation;
    
            //Re-enable player character controller so he can move
            playerCharacter.enabled = true;
    
            //Save the current location that we just switched to
            currentLocation = newLocation; 
    
    }
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: