유니티 스크립트
2016.02.04 12:38

화면에 이미지를 표시하는 스크립트(C#)

조회 수 2370 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

GUI를 화면에 그리는 스크립트입니다.

a는 그려질 화면의 위치 중 x좌표.

b는 그려질 화면의 위치 중 y좌표.

c는 그려질 텍스쳐의 크기 중 가로크기.

d는 그려질 텍스쳐의 크기 중 세로크기.

입니다.

스크립트를 유니티에 끌어다 놓고 보시면 None(Texture2D)라는 글이 써져있는 네모난 칸이 있는데,

그 안에 화면에 표시할 이미지를 드래그 앤 드롭하시면 됩니다.

 

[스크립트]

 

using UnityEngine;
using System.Collections;

public class menus : MonoBehaviour {
    public Texture2D button = null;
    public int a = 0;
    public int b = 0;
    public int c = 0;
    public int d = 0;

    void OnGUI() {
        GUI.DrawTexture (new Rect (a, b, c, d), button);
    }
}


 

 

?
  • profile
    천무 2016.02.04 13:25
    유니티도 보면 참 제작환경이 좋은것 같습니다.

  1. Wav 파일 암호화 도구 - RMMV

    Date2016.11.30 CategoryRPGMV 플러그인 By러닝은빛 Views1229 Votes1
    Read More
  2. CSS 캔버스 필터

    Date2016.10.06 CategoryRPGMV 플러그인 By러닝은빛 Views912 Votes0
    Read More
  3. 화면 다중 분할 플러그인(Multiple Viewports)

    Date2016.08.25 CategoryRPGMV 플러그인 By러닝은빛 Views1174 Votes0
    Read More
  4. 텍스트 입력창(Keyboard Input Dialog)

    Date2016.08.09 CategoryRPGMV 플러그인 By러닝은빛 Views1421 Votes1
    Read More
  5. Font Setup

    Date2016.07.22 CategoryRPGXP 스크립트 By운님 Views1447 Votes0
    Read More
  6. 맵상에서 캐릭터 스프라이트 이미지를 offset해주는 플러그인

    Date2016.07.19 CategoryRPGMV 플러그인 Bylklslel Views1071 Votes0
    Read More
  7. Refresh Manager

    Date2016.05.24 CategoryRPGMV 플러그인 By러닝은빛 Views1382 Votes1
    Read More
  8. YouTube Player

    Date2016.05.08 CategoryRPGMV 플러그인 By러닝은빛 Views1477 Votes0
    Read More
  9. 이벤트 자동 추적 플러그인

    Date2016.04.27 CategoryRPGMV 플러그인 By러닝은빛 Views2703 Votes3
    Read More
  10. 픽쳐 터치 플러그인

    Date2016.04.17 CategoryRPGMV 플러그인 By양갱님 Views2046 Votes0
    Read More
  11. 이벤트 이름 표시하기

    Date2016.04.05 CategoryRPGMV 플러그인 By러닝은빛 Views2092 Votes1
    Read More
  12. VX Ace 용 8방향 이동 스크립트

    Date2016.03.17 CategoryRPGVX Ace 스크립트 By도라지power Views1654 Votes0
    Read More
  13. Item Stream

    Date2016.03.08 CategoryRPGMV 플러그인 By러닝은빛 Views3196 Votes0
    Read More
  14. 대화에 얼굴이 나오는 스크립트 by: killarot(네이버 dust_mite)(수정버전)

    Date2016.02.22 CategoryRPGXP 스크립트 By부초 Views1895 Votes0
    Read More
  15. 지속데미지 스크립트(MBS)

    Date2016.02.14 CategoryRPGVX Ace 스크립트 By天下太平 Views1516 Votes0
    Read More
  16. 한글 이름 입력창 2.1v

    Date2016.02.12 CategoryRPGMV 플러그인 By맛난호빵 Views2391 Votes0
    Read More
  17. 화면에 이미지를 표시하는 스크립트(C#)

    Date2016.02.04 Category유니티 스크립트 Byzerosium Views2370 Votes0
    Read More
  18. [plugin] YEP.58 – Item Synthesis (YEP엔진 아이템 합성 시스템)

    Date2016.01.21 CategoryRPGMV 플러그인 Byplam Views2370 Votes0
    Read More
  19. 윈도우 시스템 트레이로 최소화

    Date2016.01.21 CategoryRPGMV 플러그인 By러닝은빛 Views2028 Votes0
    Read More
  20. Wave Filter

    Date2016.01.14 CategoryRPGMV 플러그인 By러닝은빛 Views961 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)