i writing build utility function generates asset bundles. have implemented incremental building of assets. want ensure when ever there update in unity3d version want ensure build asset bundles again. can tell me how current version of unity3d using script (c#/javascript). thanks
it seems there few ways this.
first way use preprocessor definition's check version have. don't think solution problem, neverless, use them this:
// specific version define including minor revision #if unity_2_6_0 // use unity 2.6.0 specific feature #endif // specific version define not including minor revision #if unity_2_6 // use unity 2.6.x specific feature #endif more helpful situation use getfullunityversion function or application.unityversion variable.
using unityeditorinternal; ... datetime dt = new datetime(1970, 1, 1, 0, 0, 0, 0); debug.log( "unity version = " + application.unityversion + "\n" + "full unity version = " + internaleditorutility.getfullunityversion() + "\n" + "version date = " + dt.addseconds(internaleditorutility.getunityversiondate())); you store current version in file, , every time, check if version same. if isn't same, have rebuild asset bundles.
hope helps!
Comments
Post a Comment