6 months ago

It's been almost 2 years since the last poll. So it's time for a new one!

What will be output to the console when the Start() method is executed?

Choose the answer below!

(Full code in the article)


SampleScript.cs

		
			
using UnityEngine;

namespace Assets.Samples.Sample4
{
    public class SampleScript : MonoBehaviour
    {
        private readonly Person _field = new Person();
        private Person _property => new Person();

        private void Start()
        {
            _field.Init("Mike", 25);
            _property.Init("Lucas", 35);

            _field.Introduce();
            _property.Introduce();
        }
    }
}
		
	

Person.cs

		
			
using UnityEngine;

namespace Assets.Samples.Sample4
{
    public class Person
    {
        public string Name { get; private set; } = "John";
        public int Age { get; private set; } = 18;

        public void Init(string name, int age)
        {
            Name = name;
            Age = age;
        }

        public void Introduce()
        {
            Debug.Log(quot;Hey, I'm {Name}, {Age} yo.");
        }
    }
}
		
	
  22 votes Voting finished



6 comments

Loading...

Next up

Help wanted!

Translator (English -> Hindi)

More information in the article

Introducing the translation team!

9 languages, 7 translators and a huge amount of content to translate. I'm sure it's worth it!

Links and contacts will be on the new game page that will be created soon

2025

The project is in the final stages of development - game balance and testing team will begin forming very soon.

But before that, some animations need to be finished.

More information in the article

🏆Meet the winners of the Narrative Jam presented by Game Jolt and @NEOWIZ_QUEST ! Where every story finds its voice!

Main menu demonstration

Interface has reached final form. Drawing icons, writing logic and supporting many languages - all this was done by me.

UI/UX design is quite an interesting experience, I'll definitely continue to learn it in my new projects

2025

Happy Joltidays! A new quest has entered your quest log. Accept the quest and follow @ElPichon to open today's slot on the calendar.

Help wanted!

Translator (English -> Portuguese)

More information in the article

Introducing the voice acting team!

2 roles, 4 languages, 8 voice actors. So much work went into this - all to make your gameplay even better!

Links and contacts will be on the new game page that will be created soon

2025

🥉✨ I won 3rd place in the Narrative Jam! ✨🥉

My game Luna Magica made it into the winners of the Game Jolt + NEOWIZ jam ÒwÓ They really loved the worldbuilding and the dark magical-girl vibe, 🌙

Thank you so much to everyone who played it! #GameDev #JotaDev

Help wanted!

Translator (any language), Animator

More information in the article