2 years ago

It's been 6 months since the last poll. Again. That's what I call stability.

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.Sample3
{
    public class SampleScript : MonoBehaviour
    {
        private void Start()
        {
            Base overrideExample = new OverrideExample();
            Base hidingExample = new HidingExample();

            print(quot;{overrideExample.Name} {hidingExample.Name}");
        }
    }
}
		
	

Base.cs

		
			namespace Assets.Samples.Sample3
{
    public abstract class Base
    {
        public virtual string Name => nameof(Base);
    }
}
		
	

OverrideExample.cs

		
			namespace Assets.Samples.Sample3
{
    public class OverrideExample : Base
    {
        public override string Name => nameof(OverrideExample);
    }
}
		
	

HidingExample.cs

		
			namespace Assets.Samples.Sample3
{
    public class HidingExample : Base
    {
        public new string Name => nameof(HidingExample);
    }
}
		
	
  37 votes Voting finished



2 comments

Loading...

Next up

Help wanted!

Animator

More information in the article

Help wanted!

Translator (English -> Hindi)

More information in the article

After 3.5+ years, I changed the logo. I liked the old one quite well, but I decided to redesign it because of the upcoming change in my direction in game development.

What do I mean?

You'll find out soon.

Happy Video Game Day!

July 8 is Video Game Day, a holiday that's obviously close to our hearts at Game Jolt.

Celebrate by completing our quests! They won't be around long, so get the rewards while you can.

Preparations for the release are in full swing!

A new page will be created for the new version of the game. I have already created a description for it

2025

@ryon is a Jolter to Watch, game dev, programmer, and artist who worked on Five Nights at Friedrich's! Follow @ryon before the quest ends on July 15 and you'll get Coins!

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

Help wanted!

Translator (any language), Animator

More information in the article

Big news! @pm-studios  has joined Game Jolt! They're a video game publisher who love physical gaming and do their part to keep it alive!

Welcome them to Game Jolt by giving them a follow.

Help wanted!

Translator (English -> Portuguese)

More information in the article