refacto: move CameraManager again
This commit is contained in:
parent
e994fd7f4e
commit
ecfcbbae41
@ -545,7 +545,7 @@ MonoBehaviour:
|
|||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 429358651}
|
- m_Target: {fileID: 1181392807}
|
||||||
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
||||||
m_MethodName: WebcamStop
|
m_MethodName: WebcamStop
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
@ -860,7 +860,6 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 429358650}
|
- component: {fileID: 429358650}
|
||||||
- component: {fileID: 429358649}
|
- component: {fileID: 429358649}
|
||||||
- component: {fileID: 429358651}
|
|
||||||
- component: {fileID: 429358652}
|
- component: {fileID: 429358652}
|
||||||
- component: {fileID: 429358653}
|
- component: {fileID: 429358653}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
@ -897,22 +896,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &429358651
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 429358648}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: efbbc7abb0db8c7e0b29ec4bb986d783, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
wTexture: {fileID: 0}
|
|
||||||
freezeButton: {fileID: 223773138}
|
|
||||||
resumeButton: {fileID: 1114535086}
|
|
||||||
photoBox: {fileID: 1316036600}
|
|
||||||
--- !u!114 &429358652
|
--- !u!114 &429358652
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -925,7 +908,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 3b41deef4ebd372d5a18eabdb00cfbb4, type: 3}
|
m_Script: {fileID: 11500000, guid: 3b41deef4ebd372d5a18eabdb00cfbb4, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Canvas: {fileID: 1202782726}
|
|
||||||
--- !u!114 &429358653
|
--- !u!114 &429358653
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -2936,7 +2918,7 @@ MonoBehaviour:
|
|||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 429358651}
|
- m_Target: {fileID: 1181392807}
|
||||||
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
||||||
m_MethodName: WebcamResume
|
m_MethodName: WebcamResume
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
@ -3399,13 +3381,14 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1181392806}
|
- component: {fileID: 1181392806}
|
||||||
|
- component: {fileID: 1181392807}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: TakePictureState
|
m_Name: TakePictureState
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1181392806
|
--- !u!224 &1181392806
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3432,6 +3415,22 @@ RectTransform:
|
|||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1181392807
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1181392805}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: efbbc7abb0db8c7e0b29ec4bb986d783, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
wTexture: {fileID: 0}
|
||||||
|
freezeButton: {fileID: 223773138}
|
||||||
|
resumeButton: {fileID: 1114535086}
|
||||||
|
photoBox: {fileID: 1316036600}
|
||||||
--- !u!1 &1202782726
|
--- !u!1 &1202782726
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4296,7 +4295,7 @@ MonoBehaviour:
|
|||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 429358651}
|
- m_Target: {fileID: 1181392807}
|
||||||
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
m_TargetAssemblyTypeName: CameraManager, Assembly-CSharp
|
||||||
m_MethodName: WebcamChange
|
m_MethodName: WebcamChange
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
|
@ -371,5 +371,3 @@ public enum GameState
|
|||||||
VoteSent = 6,
|
VoteSent = 6,
|
||||||
Score = 7
|
Score = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
public class StorageManager : MonoBehaviour
|
public class StorageManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public GameObject Canvas;
|
|
||||||
private StorageReference storage;
|
private StorageReference storage;
|
||||||
private DatabaseReference realtimeDB;
|
private DatabaseReference realtimeDB;
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ public void UploadPhoto()
|
|||||||
Texture2D photo = gameObject.GetComponent<CameraManager>().GetPhoto();
|
Texture2D photo = gameObject.GetComponent<CameraManager>().GetPhoto();
|
||||||
byte[] photoBytes = ImageConversion.EncodeToJPG(photo);
|
byte[] photoBytes = ImageConversion.EncodeToJPG(photo);
|
||||||
|
|
||||||
GameManager game = Canvas.GetComponent<GameManager>();
|
GameManager game = gameObject.GetComponent<GameManager>();
|
||||||
string imageUuid = Guid.NewGuid().ToString();
|
string imageUuid = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
StorageReference imageRef = storage.Child($"{game.myRoom.code}/{game.currentPlayer.id}/{imageUuid}.png");
|
StorageReference imageRef = storage.Child($"{game.myRoom.code}/{game.currentPlayer.id}/{imageUuid}.png");
|
||||||
@ -55,6 +54,7 @@ public void UploadPhoto()
|
|||||||
{
|
{
|
||||||
// Metadata contains file metadata such as size, content-type, and md5hash.
|
// Metadata contains file metadata such as size, content-type, and md5hash.
|
||||||
StorageMetadata metadata = task.Result;
|
StorageMetadata metadata = task.Result;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user