Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question (Beginner Question): Does Unity have a equivalent to creating a derived Blueprint class?

Discussion in 'Scripting' started by everylastcoin, Feb 10, 2023.

  1. everylastcoin

    everylastcoin

    Joined:
    Feb 10, 2023
    Posts:
    2
    Hi all, sorry for the beginner question. I'm migrating from Unreal to Unity. In Unreal, the way I'd work (for example, making a character) is by creating a C++ script, giving it components like a skeletal mesh, camera, springarm, etc, then deriving a blueprint class. That blueprint class derived from the original C++ script, which I'd edit when I want to add functionality to the character.

    I'm kind of lost when it comes to doing it similarly in Unity. From what I've gathered, the closest equivalent is to make your player character a prefab, with a main "character" script attached, and then the mesh, camera, springarm, etc, as components. Is this accurate? Is there something I'm missing? Thank you so much.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,954
    Welcome! I hope you have great success in Unity and wrapping your mind around slightly different ways of doing things.

    Unity favors the Component hierarchy where you compose your object from "things that do interesting things."

    You may use C# inheritance to accomplish this as well,, but the actual Unity primary API is more Component-driven.

    Prefabs are unrelated to code yet obviously may live in close symbiosis with code that drives them.

    As far as Blueprints, this forum is for scripting, eg, you scribble the C# code yourself. Unity's notion of an Unreal blueprint would be more thoroughly analogous to the Visual Scripting subsystem, which has its own forum with resident experts here:

    https://forum.unity.com/forums/visual-scripting.537/

    It maybe very useful to you to set your own project aside and work through some good Unity tutorials to get a sense of "what is commonly done" vs "what is more edge-casey."
     
  3. everylastcoin

    everylastcoin

    Joined:
    Feb 10, 2023
    Posts:
    2
    Thanks so much! This is super helpful!
     
    Kurt-Dekker likes this.