“#UnityTips With a little script like this you can group objects into a new empty GameObject by pressing CTRL + G Don't forget to put the script into a folder called Editor! #gamedev #indiedev #csharp https://t.co/YvFfsVkarH”




#sam reid#interview with the vampire#the vampire lestat#iwtv
seen from Yemen
seen from France

seen from Türkiye

seen from United States
seen from Malaysia

seen from Bolivia

seen from France

seen from Malaysia
seen from Singapore
seen from United States

seen from United States

seen from United States
seen from United States

seen from Malaysia
seen from United States

seen from France
seen from Sweden

seen from Italy
seen from China
seen from Malaysia
“#UnityTips With a little script like this you can group objects into a new empty GameObject by pressing CTRL + G Don't forget to put the script into a folder called Editor! #gamedev #indiedev #csharp https://t.co/YvFfsVkarH”

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
I have created this little script to be able spawn batches of game objects to be used as in-game prefabs. Basically it does;
Populate a defined area.
Defined area can be 2d/3d square or a sphere.
You can control density of Spawns.
This is tool is made to be used in editor to prepare prefabs.
You can find more detailed information and source code in the link provided.
Target Android, or target Ouya ?
From the previous script, handling a build for a specific platform, here's how we manage to build for a wide android audience and also build for the Ouya, which is restricted to a recent API version.
Build with an auto incremented app version
A very easy thing for the first post : how can you keep your app version when you're building an app ?
There's a lot of existing answers to that, from the included major/minor version kept in your favorite IDE to a shell script that do everything on its own. But I like to have everything in the same place, so the solution I like to have in a unity project is to have this information stored in the unity project.
Let's create a data file for that, right ? You could create a text file, a json or even an XML file, but I've got something even more integrated than that : a ScriptableObject.
Here's what I'm using for a simple project :
public class AppVersion : ScriptableObject { public int majorVersion = 0; public int minorVersion = 1; public string build; }
Pretty simple, but that's not enough. Here's how to create the default asset and increment major and minor version a simple way, via a new "Build" menu :
public class TargetBuildOneClick : EditorWindow { static AppVersion appVersion; static string appVersionPath = "Assets/AppVersion.asset"; [MenuItem("Build/Version/Init")] static void CreateAppVersion() { appVersion = ScriptableObject.CreateInstance(); ScriptableUtility.CreateUniqueAsset (appVersionPath, appVersion); } static void LoadAppVersion() { appVersion = AssetDatabase.LoadAssetAtPath(appVersionPath, typeof(AppVersion)) as AppVersion; if (appVersion == null) CreateAppVersion(); } // Increment minor version [MenuItem ("Build/Version/Increment minor")] static void IncrementMinor(){ if (appVersion == null) LoadAppVersion(); appVersion.minorVersion++; EditorUtility.SetDirty(appVersion); AssetDatabase.SaveAssets(); } // Increment minor version [MenuItem ("Build/Version/Increment major")] static void IncrementMajor(){ if (appVersion == null) LoadAppVersion(); appVersion.majorVersion++; EditorUtility.SetDirty(appVersion); AssetDatabase.SaveAssets(); } }
You even don't have to create it the first time : just increment a version and that's it. You could limit the access, change version and build fields from unity inspector, but that's not the purpose here.
For Unity Free users, use it in your others scripts to get the current app version so you can display it somewhere or do some stuff from it (compare to a minimum version to activate some feature for example, limit the usage in time...).
For Unity Pro users, you can use it by automatically build an app with those information, for instance, an android APK :
[MenuItem ("Build/Build Android")] static void BuildAndroid(){ string[] levels = new string[] {"Assets/Scenes/game.unity"}; // Update build automatically from current date, then save it if (appVersion == null) LoadAppVersion(); appVersion.build = string.Format("{0:yyyyMMddhhmm}", DateTime.Now); EditorUtility.SetDirty(appVersion); AssetDatabase.SaveAssets(); BuildPipeline.BuildPlayer( levels, "../build/Android/myVeryGoodGame_" + appVersion.majorVersion + "." + appVersion.minorVersion + "." + appVersion.build + ".apk", BuildTarget.Android, BuildOptions.None); }
And that's it for today !