纳金网
标题:
版编译时自动替换项目图标的脚本_教程
[打印本页]
作者:
她。
时间:
2012-6-7 16:50
标题:
版编译时自动替换项目图标的脚本_教程
.将下面到代码粘贴到新建到文件中并保存
脚本代码:
#!/usr/bin/perl
use File::Copy;
my $installPath = $ARGV[0];
#copy Default.png and Icon.png from Asset to installPath
my $iconFilename = "Icon.png";
my $defaultFilename = "Default.png";
# The type of player built:
# "dashboard", "standaloneWin32", "standaloneOSXIntel", "standaloneOSXPPC", "standaloneOSXUniversal", "webplayer", "iPhone"
my $target = $ARGV[1];
print ("
*** PostprocessBuildPlayer - Building at '$installPath' with target: $target ***
");
my $dst = $installPath . "/" . $iconFilename;
print ("Copying Icon.png [$iconFilename -> $dst
");
copy($iconFilename, $dst) or die "Icon file can not be copied ";
my $dst = $installPath . "/" . $defaultFilename;
print ("Copying Default.png [$defaultFilename -> $dst]
");
copy($defaultFilename, $dst) or die "Default file can not be copied ";
复制代码
3.将图标和启动画面文件复制到你项目到根目录中.也就是包含Assets文件夹到那个目录.Icon.png是图标,Default.png是启动画面.
4.如果你是Unity iPhone基础版,不能替换启动画面(Default.png),那就将脚本到最后3行用#注释掉
作者:
Zack
时间:
2012-11-25 19:56
学习学习,谢谢!
作者:
王者再临
时间:
2012-11-30 04:17
楼主的帖子不错呀
作者:
may
时间:
2012-11-30 22:13
支持楼主的帖子
作者:
王者再临
时间:
2012-12-28 23:28
学习了,虽然还是有难度,谢谢楼主的用心
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5