Which method should I use for building system?

I would use image slider for the building process. Are there any other method for to use in building process. If there has ready-made slides for Unity, where can I find ready-made slides for this kind of project.

What?

A “building process” - what is a “building process”? Describe the actual thing you’re creating since this name is pretty abstract/ambiguous.

A “image slider” - like a scrollbar? How does this relate to a “building process”?

I’ve created games where you can place furniture into a scene that has a scrollbar region at the bottom of the screen that you drag things out of. But this was more like a decorating thing I created and the scrollbar was the least of the complexities of it (the complex thing was the drag/drop and making sure it didn’t overlap with stuff). Think something like Sims.

But like say in Valheim you can “build” your own houses and what not. And there is nothing in that process I would consider a “image slider”.

Do you just mean a progress bar?

A UnityEngine.UI.Image configured to be “Filled” type can do this.

Or just google for progress bars. There’s a bazillion tutorials.

I mean when a building is selected from the menu, and when I put this building some place in the game world the building process will start to the end within the certain amount of time. Yes, it will have a progress bar but how can I prepare/manage the images? Through the image frames (frame by frame) asset or through a slideshow asset (if Unity has this kid of assets)?

Go look at filled UnityEngine.UI.Image components, as I listed above.

Or again, go look at tutorials. I am NOT retyping a tutorial here for you.

1 Like

He may mean images as in the images for the sprites in the game. Hey Unitkiv, can you show me your game in a screenshot and tell me what you mean. Is it a canvas or not?

Is it IN a canvas

OP needs to properly describe their situation instead of us trying to guess what it is they’re talking about.

My signature used to have a phrase in it, I deleted it a while ago though. It was somewhere in the vicinity of:
“Programming is the act of telling a computer what you want. If you can’t describe it to us as humans
 what makes you think you can describe it to your computer?”

OP
 maybe some pics of what you’re trying to do?

1 Like

I am asking building process system like in this video (3:54), video (37:54).

Are you intentionally being vague?

I’m watching Code Monkey’s Simple Building System in Unity tutorial. In the tutorial I’ve stuck in part 02:26 as I get error when I attempt to place the prefab (I modified the code. Is there has any other way to execute this code without grabbing the Utilities from unitycodemonkey.com?)

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BuildingManager : MonoBehaviour
{
    [SerializeField] private Transform PfWoodHouse;


    private InputManager inputManager;

    private void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Vector3 mousePosition = inputManager.GetMouseWorldPosition();
            Instantiate(PfWoodHouse, mousePosition, Quaternion.identity);
        }
    }
}

Need to know what the error is.

When I press the left mouse button it brings me the “Object reference not set to an instance of an object” error message. I already put the prefab in the field of the BuildingManager component.

input manager is null (not instantiated). Check again the tutorial and see how he’s instantiating the input manager (maybe just a private inputManager = new InputManager();)

No matter how many times you see this error


The answer is always the same
 ALWAYS!

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null ← any other action taken before this step is WASTED TIME
  • Identify why it is null
  • Fix that