Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Assets/Editor/CreateMoudleFloder.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
using System.IO;

//用于创建项目模块
//打开一个对话框,输入模块Name,生成一个包含Shader、Scripts、Materials、Textures、Model的文件夹

public class CreateMoudleFloder : EditorWindow
{

private string name;
private new string name;

private void OnGUI()
{
Expand All @@ -28,7 +26,7 @@ private static void CreateMoudle()
}

private static void CreateMoudleFloderWithName(string name)
{
{
string moduleString = "Assets/" + name;
if (!Directory.Exists(moduleString))
{
Expand Down
8 changes: 0 additions & 8 deletions Assets/MusicsNewPlot.meta

This file was deleted.

6 changes: 2 additions & 4 deletions Assets/Scripts/ValueChangeScript.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;

public class ValueChangeScript : MonoBehaviour
{
public string name = "123";
public new string name = "123";
public int num = 10;

//脚本上Reset按钮触发
Expand Down
24 changes: 19 additions & 5 deletions Assets/资源导入自动配置/Scripts/CustomTextureImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,37 @@ void OnPreprocessTexture()

//设置plan2
TextureImporterPlatformSettings settings = textureImporter.GetPlatformTextureSettings("Android");
if(settings.format != TextureImporterFormat.RGBA32 && settings.format != TextureImporterFormat.ETC2_RGBA8)
if (settings.format != TextureImporterFormat.RGBA32 && settings.format != TextureImporterFormat.ETC2_RGBA8)
{
textureImporter.SetPlatformTextureSettings("Android", 2048, TextureImporterFormat.ETC2_RGBA8, true);
settings.maxTextureSize = 2048;
settings.format = TextureImporterFormat.ETC2_RGBA8;
settings.allowsAlphaSplitting = true;
textureImporter.SetPlatformTextureSettings(settings);

//已弃用用上面方法
//textureImporter.SetPlatformTextureSettings("Android", 2048, TextureImporterFormat.ETC2_RGBA8, true);

}
}
}

[MenuItem("Assets/手动设置贴图格式", false, -1)]
static void SetTextureFormat()
{
if(Selection.assetGUIDs.Length > 0)
if (Selection.assetGUIDs.Length > 0)
{
AssetImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(Selection.activeObject));

if(importer is TextureImporter)
if (importer is TextureImporter)
{
(importer as TextureImporter).SetPlatformTextureSettings("Standalone", 2048, TextureImporterFormat.RGBA32, true);
TextureImporterPlatformSettings standalone = (importer as TextureImporter).GetPlatformTextureSettings("Standalone");
standalone.maxTextureSize = 2048;
standalone.format = TextureImporterFormat.RGBA32;
standalone.allowsAlphaSplitting = true;
(importer as TextureImporter).SetPlatformTextureSettings(standalone);

//已弃用用上面方法
//(importer as TextureImporter).SetPlatformTextureSettings("Standalone", 2048, TextureImporterFormat.RGBA32, true);
importer.SaveAndReimport();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"dependencies": {
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.3",
"com.unity.collab-proxy": "1.2.15",
"com.unity.collab-proxy": "1.2.16",
"com.unity.package-manager-ui": "2.0.13",
"com.unity.purchasing": "2.0.3",
"com.unity.purchasing": "2.2.2",
"com.unity.textmeshpro": "1.4.1",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2018.4.20f1
m_EditorVersion: 2018.4.36f1