반응형

대부분 Intellisence Or 확장 Plugin이 원인이 되는 경우가 많은데

다 제거 했는데도 렉이 발생 할 경우

 

Local 캐쉬를 지워보자

파일 경로는

C:\Users\사용자명(본인컴퓨터명)\AppData\Local\Microsoft\VisualStudio\17.0_2e98ed8c\ComponentModelCache

폴더 하위에 있는 4가지 파일 모두 제거 하고 VS 재실행!!!

 

 

 

반응형
반응형

 

master -> release 로 변경

반응형
반응형

Public을 인스펙터에서 수정하지 못하게 하고 싶을때

 

 

사용 예시:

1
2
[ReadOnly] public AnimationState currentCarAnimationState = AnimationState.Idle;
[ReadOnly] public AnimationState currentCharAnimationState = AnimationState.Idle;
cs

 

 

 

 

커스텀 Attribute

소스 코드:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using UnityEngine;
using System;
 
#if UNITY_EDITOR
namespace UnityEditor
{
    [CustomPropertyDrawer(typeof(ReadOnlyAttribute), true)]
    public class ReadOnlyAttributeDrawer : PropertyDrawer
    {
        // Necessary since some properties tend to collapse smaller than their content
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            return EditorGUI.GetPropertyHeight(property, label, true);
        }
 
        // Draw a disabled property field
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            GUI.enabled = !Application.isPlaying && ((ReadOnlyAttribute)attribute).runtimeOnly;
            EditorGUI.PropertyField(position, property, label, true);
            GUI.enabled = true;
        }
    }
}
#endif
 
[AttributeUsage(AttributeTargets.Field)]
public class ReadOnlyAttribute : PropertyAttribute
{
    public readonly bool runtimeOnly;
 
    public ReadOnlyAttribute(bool runtimeOnly = false)
    {
        this.runtimeOnly = runtimeOnly;
    }
}
cs

 

 

 

 

 

반응형
반응형

UnityEngine.AssetBundle:LoadAsset_Internal crash

 

간헐적으로 에셋번들 불러올때 crash가 나는 상태

특히 저사양기기에서 memory부족 crash가 나는 상태 

 

프로젝트에서 사용하고 있는 Shader를 아래 목록 (Project Settings / Graphics)에 

추가한 상태였으나 제거함

(기본만 남기고 다른 Shader의 굳이 포함x)

 

참고로 위 목록에 Shader 추가하면 빌드 타임 상당히 많이 늘어남...!

반응형
반응형

e/unity: could not produce class with id 137. this could be caused by a class being stripped from the build even though it is needed. try disabling 'strip engine code' in player settings.

 

 

에셋번들 불러올때

빌드에 class가 포함되지 않아서 정상적으로 노출되지 않는 현상

 

Mono 빌드에서는 발생안하는데

IL2CPP 빌드에서 발생

 

Strip Engine Code 체크 해제

 

 

반응형
반응형

Execution failed for task ':unityLibrary:BuildIl2CppTask'

 

Mono빌드는 잘되다가 IL2CPP 빌드가 안되는 오류가 발생했다


구글링 해봤는데 SDK / NDK 설정에 오류가 있어서 해당 IL2CPP 빌드가 안된다고 하는데 ...

링크: Execution failed for task ':unityLibrary:BuildIl2CppTask'. · Issue #440 · juicycleff/flutter-unity-view-widget · GitHub

대부분 위의 링크타서 하는 얘기처럼 NDK 경로 설정 제대로 해주면 된다고 한다.

 

내 케이스의 경우는 달랐다...

NDK 경로 설정 / 세팅된 버전을 지정해줘도 계속 빌드 오류가 발생했다...

 

다양한 삽질을 한 결과

내 케이스의 해결 방법은

ARMv7 (32비트용 빌드) 체크 해제 였다...

 

반응형

+ Recent posts