• entries
59
86
• views
40447

1396 views

1. # [font=arial]GUI System[/font]

## [font=arial]An example of how to use this system with ease (the method calls in OnDestroy, OnEnable and OnDisable are optional, but to recycle elements when certain objects are disabled/destroyed the 'Detach()' call should be called for performance reasons):[/font]

private float renderDistance = 2f; // How close should camera be to render GUI element belowprivate Floatlands.UI.Graphics.GUIElement element; // GUI Elementprivate void Start(){ element = new Floatlands.UI.Graphics.GUIElement(transform); element.SetRenderDistance(this.renderDistance); element.OnRender(() => { Vector3 screenPos = Camera.main.WorldToScreenPoint(transform.position); GUIUtils.DrawCircle(screenPos, 25f, Color.white); }); element.Attach();}private void OnDestroy(){ element.Detach();}private void OnEnable(){ element.Attach();}private void OnDisable(){ element.Detach();}

## [font=arial]Domen Koneski[/font]

2. [color=#000000][font=Lato]

# [font=arial]WEAPONS & ENEMY ROBOTS[/font]

[/font][/color]

[font=arial]

## This week I was preparing the hostile NPC robots.

[/font]If you browse through our previous posts[font=arial]

## , you can find out that we already had basic robots prepared a few months ago, but some reworking was required. The sniper droid got a cool cape, and all the droids were equiped with an IK system that handles aiming, recoil and grounding. All the droids are also equiped with a ragdoll system for satisactory robot slaying experience.

[/font]

Hardscoper

Assault

Army of enemy robots

Weapons

[font=arial]

[/font]

[font=arial]

[/font]
-

# [font=arial]http://floatlands.net[/font]

I like the cape on the sniper, and overall the robots seem nicely distinct yet similar.  Though I miss the hats I saw from an early blogpost.  I also want to see them ragdoll =P

My one question with your GUI is that you haven't mentioned why you aren't going with Unity's Canvas system and instead rolling your own immediate mode gui system?  I'd love to hear the reasons (pros, cons) behind it.

I like the cape on the sniper, and overall the robots seem nicely distinct yet similar.  Though I miss the hats I saw from an early blogpost.  I also want to see them ragdoll =P

My one question with your GUI is that you haven't mentioned why you aren't going with Unity's Canvas system and instead rolling your own immediate mode gui system?  I'd love to hear the reasons (pros, cons) behind it.

We are also using Unity's Canvas system. The GUI system we have written is based on the legacy version of Unitys GUI system (the one you had to program). We are using this system only for things like showing off items names in the nature, creating helpful overlay features for e.g. interactable stuff - doors, vehicles, etc.

We have written our own just to expand it with things such as draw distance (when the player is near an object the GUI element gets drew), and it doesn't take so much performance like the legacy GUI system - it uses one OnGUI call for each GUI element.

I like the cape on the sniper, and overall the robots seem nicely distinct yet similar.  Though I miss the hats I saw from an early blogpost.  I also want to see them ragdoll =P

My one question with your GUI is that you haven't mentioned why you aren't going with Unity's Canvas system and instead rolling your own immediate mode gui system?  I'd love to hear the reasons (pros, cons) behind it.

We are also using Unity's Canvas system. The GUI system we have written is based on the legacy version of Unitys GUI system (the one you had to program). We are using this system only for things like showing off items names in the nature, creating helpful overlay features for e.g. interactable stuff - doors, vehicles, etc.

We have written our own just to expand it with things such as draw distance (when the player is near an object the GUI element gets drew), and it doesn't take so much performance like the legacy GUI system - it uses one OnGUI call for each GUI element.

Just a thought, but what about attaching a canvas to the items you want to display text for in the world and setting them to World Space instead of Screen Space?

I really like the style of your game.  Have you written anything about what the game is going to be about?  if so where can I read up on that?

I like the cape on the sniper, and overall the robots seem nicely distinct yet similar.  Though I miss the hats I saw from an early blogpost.  I also want to see them ragdoll =P

My one question with your GUI is that you haven't mentioned why you aren't going with Unity's Canvas system and instead rolling your own immediate mode gui system?  I'd love to hear the reasons (pros, cons) behind it.

We are also using Unity's Canvas system. The GUI system we have written is based on the legacy version of Unitys GUI system (the one you had to program). We are using this system only for things like showing off items names in the nature, creating helpful overlay features for e.g. interactable stuff - doors, vehicles, etc.

We have written our own just to expand it with things such as draw distance (when the player is near an object the GUI element gets drew), and it doesn't take so much performance like the legacy GUI system - it uses one OnGUI call for each GUI element.

Just a thought, but what about attaching a canvas to the items you want to display text for in the world and setting them to World Space instead of Screen Space?

Thx for the suggestion, we're still in prototyping mode regarding UI.

I really like the style of your game.  Have you written anything about what the game is going to be about?  if so where can I read up on that?

Yes, we did. Just go to our page and click on Press.

## Create an account

Register a new account