This site uses cookies! Learn More

This site uses cookies! 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

274 Excellent

About UnityGamesRoland

  • Rank
  • Birthday 02/23/1999

Profile Information

  • Gender
  • Location:
  • Interests
    Game Creation and Modeling

Contact Methods

Recent Profile Visitors

1,426 profile views
  1. Yeah I saw it, but somehow it didn't work on my first attempt. It works now, thanks!
  2. Does anyone know how can I have Camera and AudioClip fields in custom inspectors? I know that I have to use ObjectField for them, but I don't know how can I make them specific. (only Camera, AudioClip, etc...)
  3. main menu

    Even better if you would send the index of the level which you want to be loaded. If you do this, you can set the index at the OnClick() event in the inspector. public void LoadLevel (int sceneIndex) { //Loading level with index <sceneIndex>. SceneManager.LoadScene(sceneIndex); }
  4. Yeah, that's the only downside if we are using local system time.
  5. An easy way of having any timed reward in a project. It is using your system time, so closing the game is not going to affect the timer. The script saves when did you get the reward, and checks if the current time is more then the last rewarded + wait time. Just drag and drop the script to a gameObject, and call GetReward() from a UI Button. Inside the GetReward() you can add you own code, which will reward the player.
  6. Managed to find answer in this thread. This problem is happening because of object serialization in unity. (You can read about it in the thread.) I have added EditorUtility.SetDirty at the end of the script, and it solved the problem. public override void OnInspectorGUI() { TestScript myScript = (TestScript)target; myScript.someNumber = EditorGUILayout.FloatField("Some Number", myScript.someNumber); if(GUI.changed) EditorUtility.SetDirty(myScript); }
  7. Ok, I'm even more confused now. This script which I showed in the post is saving correctly, but my player motor scripts custom inspector doesn't... :/
  8. I'm having trouble with custom inspector scripts. This is the first time I'm creating a custom inspector, so it is possible that I missed something. When I modify the variable's value and start the game, the value just resets. Anyone knows why does this happen? //TestScript.cs using UnityEngine; public class TestScript : MonoBehavior { public float someNumber = 5; } //TestScriptEditor.cs using UnityEngine; using UnityEditor; [CustomEditor(typeof(TestScript))] public class TestScriptEditor : Editor { public override void OnInspectorGUI() { TestScript myScript = (TestScript)target; myScript.someNumber = EditorGUILayout.FloatField("Some Number", myScript.someNumber); } }
  9. You can use the <> icon to insert code to the post. And yeah it is a basic yet pretty good script.
  10. Good workaround
  11. (It is possible that I misunderstood your problem) I made a script for dynamic GUI elements a while ago (still available here), and I had to deal with this behavior: If you have the same issue, just check if the object is actually on the screen. Calculating the camera's frustum will solve the problem.
  12. 3d models

    The quality for free models like these are awesome. Good work!
  13. How did you test it if you didn't had any textures? Or didn't even tested it?
  14. You know, a plane or something which has the shader applied on.
  15. If you create another box for the item's description under the inventory, it is going to work just fine. Calculating the mouse position on screen is pretty complicated to be honest.