0.7.0 Map Changes

기존 맵 파일 최신화 방법

1. 스튜디오를 실행하고 Blank 맵을 생성해주세요.

2. Blank 맵에서 아래와 같은 오브젝트들을 선택한 뒤, 복사해주세요. ( Ctrl + C )

3. 이전 버전에서 작업했던 맵 파일을 열어주세요.

4. Blank 맵에서 복사한 오브젝트들을 붙여넣기 해주세요. ( Ctrl + V )

5. 기존에 있던 스크립트새로 붙여넣기 한 스크립트에 다른 부분이 있는지 체크해주세요. 있다면, 새로 붙여넣기 한 스크립트에 옮겨주세요.

BaseSetting의 경우, 프로퍼티 구성이 다음과 같이 변경되었으니 참고하여 수정해주세요.

6. 변경 사항을 모두 체크 했다면, 기존에 있던 스크립트를 삭제해주세요.

7. 새로 붙여넣기 한 스크립트의 위치를 아래와 같이 수정해주세요.

위치를 조정한 BaseSetting 객체는 상위에 있는 CharacterSetting에 다음과 같이 연결해주세요.

월드 트리에서 검색을 통해 CharacterSetting을 사용하는 곳이 있는지 체크 후, 하위에 있는 BaseSetting을 위 방법대로 교체해주세요.



스크립트 변경 사항

1. 일부 함수가 속성으로 변경되어 곧 삭제될 예정이에요. 스크립트 내에서 사용하고 있다면, Ctrl+Shift+F로 찾아서 수정해주세요.

삭제될 함수대체할 속성(Widget 이외의 객체에 사용한 경우)대체할 속성(Widget에 사용한 경우)

:SetName() / :GetName()

.Name

.Name

:SetVisibility() / :GetVisibility() :SetVisible() / :GetVisible()

.Visible

.Visible

:SetTransform() / :GetTransform()

.Transform

-

:SetLocalTransform() / :GetLocalTransform()

.LocalTransform

-

:SetLocation() / :GetLocation()

.Location

.UIPosition

:SetLocalLocation() / :GetLocalLocation()

.LocalLocation

-

:SetLocation(vector, true)

:SetLocationWithCollisionCheck(vector, true)

:SetLocationWithCollisionCheck(vector, true)

:SetRotation() / :GetRotation()

.Rotation

.UIRotation

:SetLocalRotation() / :GetLocalRotation()

.LocalRotation

-

:SetScale() / :GetScale()

.Scale

.UIScale

:SetScaleXYZ() / :GetScaleXYZ()

.ScaleXYZ

-

:SetOpacity() / :GetOpacity()

-

.Opacity

:GetWidth()

-

.Size.X

:GetHeight()

-

.Size.Y

주의❗

Widget 객체의 위치를 변경한 경우, Z값을 꼭 포함하여 작성해주세요.

Widget.UIPosition = Vector.new(x, y, z)

주의❗

:SetName(), :GetName 함수가 .Name 속성으로 변경되면서 “Name”이라는 이름을 가진 객체를 스크립트에서 호출하면 오류가 발생할 수 있어요.

객체 이름은 “Name”이 아닌 다른 이름을 사용해주세요.

2. 잘못된 함수 이름을 수정했어요. 스크립트 내에서 사용하고 있다면, Ctrl+Shift+F로 찾아서 수정해주세요.

기존변경

SetEnableMovementeControl

SetEnableMovementControl

GetEnableMovementeControl

GetEnableMovementControl

3. 일부 함수 이름이 다음과 같이 변경되었어요. 스크립트 내에서 사용하고 있다면, Ctrl+Shift+F로 찾아서 수정해주세요.

기존변경

AddUIScale

AddUISize

player:SetUsingCharacterSetting

player:ChangeCharacterSetting

SetUsingCharacterBaseSetting

ChangeCharacterBaseSetting

SetUsingCharacterAppearanceSetting

ChangeCharacterAppearanceSetting

SetUsingCharacterAnimationSetting

ChangeCharacterAnimationSetting

GetUsingCharacterSetting

StoreCurrentCharacterSetting / RestorePreviousCharacterSetting StoreCurrentCharacterBaseSetting / RestorePreviousCharacterBaseSetting StoreCurrentCharacterAppearanceSetting / RestorePreviousCharacterAppearanceSetting StoreCurrentCharacterAnimationSetting / RestorePreviousCharacterAnimationSetting

주의❗

Game 객체에 사용한 SetUsingCharacterSetting그대로 사용해요.

player 객체에 사용한 SetUsingCharacterSetting만 수정해주세요

참고❕

GetUsingCharacterSetting 함수를 수정하실 때는 아래 예제를 참고해주세요.

local Item = Workspace.GunItem
-----------------------------------------------------------------
local function ChangeGunCharacter(player)
    -- 1.   플레이어의 현재 CharacterSetting을 저장해요.
    player:StoreCurrentCharacterSetting()

    -- 2.   플레이어의 CharacterSetting을 변경해요.
    local gunCharacterSetting = Workspace.GunCharacterSetting
    player:ChangeCharacterSetting(gunCharacterSetting)
end
Item:EquipEvent(ChangeGunCharacter) -- Item 장착 시 호출할 함수를 지정해요.

-----------------------------------------------------------------
local function ResetCharacter(player)
    -- 3.   1에서 저장한 CharacterSetting으로 돌아가요.
    player:RestorePreviousCharacterSetting()
end
Item:UnEquipEvent(ResetCharacter) -- Item 장착 해제 시 호출할 함수를 지정해요.

4. SpotLight, PointLight의 프로퍼티를, 스크립트에서 속성으로 사용할 수 있도록 변경되었어요.

SpotLight, PointLight의 프로퍼티를 변경하는 함수는 삭제 예정이에요. 테스트 플레이 도중 관련 오류를 발견한다면 수정해주세요.

SpotLight 속성PointLight 속성

SpotLight.Visible

PointLight.Visible

SpotLight.Intensity

PointLight.Intensity

SpotLight.LightColor

PointLight.LightColor

SpotLight.AttenuationRadius

PointLight.AttenuationRadius

SpotLight.InnerConeAngle

PointLight.SourceRadius

SpotLight.OuterConeAngle

PointLight.SourceLength

5. AttachAt, AttachAtTop, AttachTo, Detach 함수가 변경되었어요. 스크립트 내에서 사용하고 있다면, Ctrl+Shift+F로 찾아서 수정해주세요.

  • AttachAt / AttachAtTop / Detach 의 변경사항이에요.

기존변경

Character:AttachAt(Object) Character:AttachAtTop(Object)

Object:AttachCharacter(Character, Enum.AttachPoint.Top)

Character:Detach() Character:Detach(Vector.new(0, 0, 100))

Object:DetachAllCharacter() Object:DetachAllCharacter(Vector.new(0, 0, 100)) Object:DetachCharacter(Character) Object:DetachCharacter(Character, Vector.new(0, 0, 100)) |

참고❕

Attach 시 캐릭터를 붙일 지점을 정할 수 있는 Enum.AttachPoint 의 종류를 아래에서 참고해주세요.

종류위치

Top

위쪽 중앙

Center

중앙

Right

오른쪽 중앙

Left

왼쪽 중앙

참고❕

Object:DetachAllCharacter() 는 해당 Object에 Attach된 모든 캐릭터들을 Detach 하는 함수에요.

Object:DetachCharacter(Character) 는 해당 Object에 Attach된 캐릭터 중 지정된 캐릭터를 Detach 하는 함수에요.

  • AttachTo / Detach 변경사항이에요.

사용 객체가 Mesh인 경우, 다음과 같이 변경해주세요.

기존변경

Mesh:AttachTo(Player, Enum.Bone.Head)

Character:AttachObject(Mesh, Enum.Bone.Head)

Mesh:Detach()

Character:DetachAllObject() Character:DetachObject(Mesh)

사용 객체가 Item인 경우, 다음과 같이 변경해주세요.

Item 객체를 EquipInventoryItem 함수로 장착하면, 다른 처리 없이도 캐릭터에 붙을 수 있도록 변경되었어요.

(1) EquipEvent 함수에 Item을 AttachTo 처리한 스크립트가 있다면 삭제 후,

(2) Item을 붙일 Bone을 Item 객체의 프로퍼티에서 설정해주세요.

Last updated