Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

Community Reputation

41 Excellent

1 Follower

About Kronus.

  • Rank
  • Birthday 04/22/1998

Profile Information

  • Gender
  • Location:
    Rio de Janeiro, Brazil
  • Interests
    Develop games in C# using Unity 3D ;P

Recent Profile Visitors

693 profile views
  1. Hey guys, I'm making a project to waste time, and in this project I'm using ArmedPrefs(made by Erarnitox), but sometimes I just need PlayerPrefs to save things like Resolution, Quality and etc... So I wrote this script to "make it more easier". What are the advantages? 1st - You can load things in two ways now: Ex: DataManager.GetInt("MyInt") Or you can define a "default value" in the final of the function, so if this key do not really exists it will return this value, create and save a new key with the name and the value you used. Ex: DataManager.GetInt("MyInt", 100); // it will return 100, create and save the key if it not exist. 2nd - You can now save and load boolean variables. Ex: DataManager.SetBool("MyBool", true); Ex: DataManager.GetBool("MyBool"); Ex: DataManager.GetBool("MyBool", true); 3rd - Set functions are now saved automatically, so you do not need to use PlayerPrefs.Save(); or DataManager.Save(); 4th - If you want to use this instead PlayerPrefs, you just have to change "PlayerPrefs" to "DataManager". The miracle code This script is very simple, but I hope it can help someone DataManager.cs
  2. This is not about "frames per second", it's about monitor's refresh rate, it just matter if you have a monitor with more than 60Hz refresh rate, that is not my case, and this project is just something I'm doing to waste time it wiil not be published anywhere(I guess :D). And if you can solve this by changing 2 lines on a script, I don't think you have to worry about make another array.
  3. Just for help if other people have the same issue. I solved this way: // Add this on top of the script. using System.Linq; // And change: resolutions = Screen.resolutions to.. resolutions = Screen.resolutions.Where(resolution => resolution.refreshRate == 60).ToArray(); // Now only resolutions with 60Hz will be shown :D
  4. Yeah man, you are absolutely right! Thank you for help!
  5. Hi guys, Today I started to make a Main Menu for my project and somehow when I made the Options part I found a bug. When I'm in editor the resolutions of the dropdown are shown perfectly, but when I use this in a build it is showing the same resolution 4 times. OBS: This resolutions working perfectly, each resolution I choose it works as it should. But it stills annoying me. This is the part of code i'm using to update the dropdown options: // In a function that is called only OnAwake resolutionDropdown.options.Clear(); for (int i = 0; i < Screen.resolutions.Length; i++) { resolutionDropdown.options.Add(new Dropdown.OptionData() { text = ResolutionToString(i) }); } // The function i use to convert Resolution to String. string ResolutionToString(int index) { return (resolutions[index].width + "x" + resolutions[index].height); } Thank you, regardless!
  6. Hi guys, I think I already posted this codes here, but somehow I can't find it, so I decided to post a new script. This code was not made by me! I just turned it more simple, converted to C# and converted to be used with UI Text! I found this code here: Thanks to 'robertbu' ! using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; [RequireComponent(typeof(Text))] public class BlinkEffect : MonoBehaviour { public enum BlinkType { SIMPLE, FADE, FADE_SINUSOIDAL } [SerializeField] BlinkType blinkType; [SerializeField] float speed; private Text label; private Color newColor; private void Start() { label = GetComponent <Text>(); newColor = label.color; } private void Update() { switch(blinkType) { case (BlinkType.SIMPLE): { newColor.a = Mathf.Round (Mathf.PingPong (Time.time * speed, 1.0f)); break; } case(BlinkType.FADE): { newColor.a = Mathf.PingPong (Time.time * speed, 1.0f); break; } case(BlinkType.FADE_SINUSOIDAL): { newColor.a = (Mathf.Sin(Time.time * speed) + 1.0f) / 2.0f; break; } } label.color = newColor; } } - Simple(Just a simple on and off) - Fade(A fade in and out blink) - Fade Sinusoidal(A fade in and out with smoother ends) How to use? 1 - Create a C# Script called 'BlinkEffect', paste the code above and save! 2 - Add the script in any UI Text. 3 - And set the type of effect and speed you want All credits go to 'robertbu' from Answers Unity !
  7. I get very disappointed when I see a countryman doing such nonsense. I see you joined the community recently, so I recommend you read the rules... You MUST always write in English here on the site, and remember if you use Google Translator, write correctly, without any slang or abbreviations to get better at understanding the translation... And remember to post in correct sections, this "unity3D | Tutorials" section is only for Tutorials, if you have a doubt go to "Need Help?" section. About your question... In my opinion and experience with Multiplayer the easiest way I found to work with it is using Photon... You can download a free version of Photon in Unity's Asset Store, but you'll need to adapt all of your scripts to work with it, I recommend you to make a backup of your project before start doing it.
  8. Why are you calling KillCounter's Update() on ZombieDead's Start() ?
  9. Nice graphics, but... It's looking like a Rust copy both in Gameplay as in UI(Like UnityGamesRoland said!), I really think if you can "remake" Rust, you can do your own game, with your ideas, with your concept and make it fantastic... I hope you don't misunderstand me.
  10. Why do you think he must work for you? If you read his scripts, you'll understand how to extend this menu freely.
  11. I've made a Menu inspired in yours, but much more simple and i haven't added Options yet, anyway great job man
  12. Good, but if you change the Collider's Center Y axis for Height / 2, you won't need to change player's position =D
  13. I'm having a problem to use this, when my HeadBobber's Y axis isn't 0 and i land, the HeadBobber's Y axis go to 0 and back to the last position.
  • Create New...