'Unity'에 해당되는 글 36건

  1. 2020.08.12 안드로이드 출시 오류 앱 번들
  2. 2020.08.12 구글 출시 연동 영상자료
  3. 2020.08.12 Button Image 변경
  4. 2020.08.11 Unity Button Array onClick
  5. 2020.08.11 Unity GameObject 부모 자식 관계 설정
  6. 2019.08.21 unity editor select list
  7. 2019.07.23 custom Inspector 겹치기 오류
  8. 2019.07.22 Unity Custom Inspector 커스텀 인스펙터

안드로이드 출시 오류 앱 번들

Unity/Android Build 2020. 8. 12. 21:27

https://scvtwo.tistory.com/72

'Unity > Android Build' 카테고리의 다른 글

구글 출시 연동 영상자료  (0) 2020.08.12
:

구글 출시 연동 영상자료

Unity/Android Build 2020. 8. 12. 21:26

https://www.youtube.com/watch?v=74Spcz9Hhgo

시작 ~ 14분 : 앱등록
14~ : 구글 로그인 GPGS

'Unity > Android Build' 카테고리의 다른 글

안드로이드 출시 오류 앱 번들  (0) 2020.08.12
:

Button Image 변경

Unity/찾아본것 2020. 8. 12. 10:11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
public class SceneTestStageBtn : MonoBehaviour
{
    public Button btn;//버튼
    public Sprite img;//바꿀 이미지
 
    void Start()
    {
        this.btn.GetComponent<Image>().sprite = this.img;
    }
}
 
cs

https://answers.unity.com/questions/1127944/changing-the-image-of-a-button-with-a-script.html

:

Unity Button Array onClick

Unity/찾아본것 2020. 8. 11. 23:55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
public class TestButtonArray : MonoBehaviour
{
    public Button[] btns;
 
    private void Start()
    {
        for (int i = 0; i < this.btns.Length; i++)
        {
            int index = i;
            btns[index].onClick.AddListener(() => this.TaskOnClick(index));
        }
    }
 
    private void TaskOnClick(int index)
    {
        Debug.Log("니가 누른 버튼" + index, btns[index]);
    }
}
 
cs


https://answers.unity.com/questions/1376530/add-listeners-to-array-of-buttons.html

:

Unity GameObject 부모 자식 관계 설정

Unity/찾아본것 2020. 8. 11. 22:14

https://docs.unity3d.com/ScriptReference/Transform-parent.html

:

unity editor select list

Unity/찾아볼것 2019. 8. 21. 10:50

unity editor select list

'Unity > 찾아볼것' 카테고리의 다른 글

custom Inspector 겹치기 오류  (0) 2019.07.23
<uBMSC> 리듬게임  (0) 2019.05.09
Unity Editor확장입문 참고  (0) 2019.05.07
찾아볼것 리스트  (0) 2019.04.12
:

custom Inspector 겹치기 오류

Unity/찾아볼것 2019. 7. 23. 17:27


아니 왜 이러세요 제발;;



https://answers.unity.com/questions/1364895/custom-property-drawer-overlaps-with-other-compone.html
https://answers.unity.com/questions/940970/header-attribute-and-custom-property-drawer-overla.html
( 위치지정을 미리 안 해놔서 그런 듯...? )

'Unity > 찾아볼것' 카테고리의 다른 글

unity editor select list  (0) 2019.08.21
<uBMSC> 리듬게임  (0) 2019.05.09
Unity Editor확장입문 참고  (0) 2019.05.07
찾아볼것 리스트  (0) 2019.04.12
:

Unity Custom Inspector 커스텀 인스펙터

Unity/찾아본것 2019. 7. 22. 16:14



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using UnityEngine;
 
public class Cube : MonoBehaviour
{
    void Start()
    {
        GenerateColor();
    }
 
    public void GenerateColor()
    {
        this.GetComponent<Renderer>().sharedMaterial.color = Random.ColorHSV();
    }
 
    public void Reset()
    {
        this.GetComponent<Renderer>().sharedMaterial.color = Color.white;
    }
}
 
cs


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
using UnityEngine;
using UnityEditor;
 
[CustomEditor(typeof(Cube))]
public class CubeEditor : Editor
{
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
 
        Cube cube = (Cube)target;
 
        GUILayout.BeginHorizontal();
 
        if (GUILayout.Button("GenerrateColor"))
        {
            cube.GenerateColor();
        }
 
        if (GUILayout.Button("ResetColor"))
        {
            cube.Reset();
        }
 
        GUILayout.EndHorizontal();
    }
}
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public class Sphere : MonoBehaviour
{
    public float baseSize = 1f;
 
    void Update()
    {
        float anim = baseSize + Mathf.Sin(Time.time * 8f) * baseSize / 7f;
        transform.localScale = Vector3.one * anim;
    }
}
 
cs



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using UnityEngine;
using UnityEditor;
 
[CustomEditor(typeof(Sphere))]
public class SphereEditor : Editor
{
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
 
        Sphere sphere = (Sphere)target;
 
        sphere.baseSize = EditorGUILayout.Slider(sphere.baseSize, .1f, 2f);
        sphere.transform.localScale = Vector3.one * sphere.baseSize;
    }
}
 
cs



왜 sphere..가 같이 색이 변하지 ( ? )

: