mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
use RawImage for player icon
This commit is contained in:
parent
5d4367fa3e
commit
e415d019fc
2 changed files with 14 additions and 15 deletions
|
@ -84,7 +84,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 224716624785451066}
|
||||
- component: {fileID: 222650630699500124}
|
||||
- component: {fileID: 114106417822196936}
|
||||
- component: {fileID: 2221864346265194034}
|
||||
m_Layer: 0
|
||||
m_Name: PlayerIcon
|
||||
m_TagString: Untagged
|
||||
|
@ -119,7 +119,7 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1085484459653070}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &114106417822196936
|
||||
--- !u!114 &2221864346265194034
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
@ -128,7 +128,7 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 1085484459653070}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
|
@ -139,15 +139,13 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &1158250797250008
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7429,10 +7427,10 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
northImage: {fileID: 114074779211426578}
|
||||
playerImage: {fileID: 114106417822196936}
|
||||
outlineImage: {fileID: 114468575846868774}
|
||||
maskImage: {fileID: 114690809005601046}
|
||||
mapImage: {fileID: 114943004525129146}
|
||||
playerImage: {fileID: 2221864346265194034}
|
||||
mapTransform: {fileID: 224779433496236624}
|
||||
maskTransform: {fileID: 224020270871840966}
|
||||
mapContainer: {fileID: 224402533417526356}
|
||||
|
|
|
@ -22,11 +22,12 @@ namespace SanAndreasUnity.Behaviours
|
|||
public static bool toggleMap;
|
||||
|
||||
public Image northImage,
|
||||
playerImage,
|
||||
outlineImage,
|
||||
maskImage,
|
||||
mapImage;
|
||||
|
||||
public RawImage playerImage;
|
||||
|
||||
public RectTransform mapTransform,
|
||||
maskTransform,
|
||||
mapContainer;
|
||||
|
@ -235,7 +236,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
Debug.Log("Starting to enable minimap!");
|
||||
|
||||
northImage.sprite = Sprite.Create(northBlip, new Rect(0, 0, northBlip.width, northBlip.height), new Vector2(northBlip.width, northBlip.height) / 2);
|
||||
playerImage.sprite = Sprite.Create(playerBlip, new Rect(0, 0, playerBlip.width, playerBlip.height), new Vector2(playerBlip.width, playerBlip.height) / 2);
|
||||
playerImage.texture = this.PlayerBlip;
|
||||
mapImage.sprite = mapSprite;
|
||||
if (maskImage.sprite == null)
|
||||
maskImage.sprite = circleMask;
|
||||
|
|
Loading…
Add table
Reference in a new issue