https://youtu.be/uyttyyB1HjI

1. Parallax Background

Untitled

2. 배경 오브텍트 위치 이동(단일)

  1. asset score에서 검색
  1. Unity > Window > Package Manager - Packages:MyAssets “Free 2D Cartoon Parallax Background” 에셋 import

    Untitled

  2. Main Camera

  3. Asset/Free 2D Cartoon Parallax Background/!_Moutain

    1. 두 장의 이미지가 이어지도록 배치

    (1) Layer_4 씬에 등록. Transform.position(0, 0, 1) 로 세팅

    (2) Layer_4 오브젝트 복제. Transform.position(40, 0, 1) 로 세팅 left.x + 40 = right.x

    Untitled

  4. 배경 이동 스크립트 작성

    🚩 배경 롤링 전략

     두 장의 이미지가 왼쪽으로 이동하다가 
     왼쪽 이미지가 카메라 영역을 벗어나면 다시 오른쪽으로 이동하도록 배치
    
    1. ParallaxBackground_Type01 스크립트 작성

    Untitled

    Untitled

    Untitled

  5. Play

3. 배경 오브텍트 위치 이동(다중)

  1. Main Camera

  2. 다중 레이어 배치

    Untitled

  3. ParallaxBackground_Type01 스크립트 등록

    Untitled

    Untitled

  4. Backgrounds Object 복제, 하위 object의 position.x값 40

    Untitled