rename FrozenScreenToWorldSpace

master
yuan 8 years ago
parent d9b8616250
commit b7e823d0e9
  1. 136
      Unity_2018_Frozen/Assets/Frozen/FrozenTwo.unity
  2. 17
      Unity_2018_Frozen/Assets/Frozen/Script/CharacterBehaviour.cs
  3. 20
      Unity_2018_Frozen/Assets/Frozen/Script/FrozenScreenToWorldSpace.cs
  4. 4
      Unity_2018_Frozen/Assets/Frozen/Script/FrozenScreenToWorldSpace.cs.meta

@ -113,6 +113,139 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &95978235
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 95978236}
- component: {fileID: 95978242}
- component: {fileID: 95978241}
- component: {fileID: 95978240}
- component: {fileID: 95978239}
- component: {fileID: 95978238}
- component: {fileID: 95978237}
m_Layer: 8
m_Name: Snow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &95978236
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 917676528}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &95978237
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 12ea4d85cdda0aa4981a82e5e18fed52, type: 3}
m_Name:
m_EditorClassIdentifier:
mat: {fileID: 0}
--- !u!114 &95978238
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03dae28dfe6734f4eb76c922ac72dd34, type: 3}
m_Name:
m_EditorClassIdentifier:
target: 2
materials:
- {fileID: 0}
attributeName: _MainTex
autoSize: 0
--- !u!114 &95978239
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10f07b3f9fb96524db93eb42d89c229c, type: 3}
m_Name:
m_EditorClassIdentifier:
VideoAsset: {fileID: 11400000, guid: fb02941bf56531748886776e54c8f2d0, type: 2}
LoadOnAwake: 1
PlayOnStart: 1
Looping: 1
AudioVolume: 1
--- !u!23 &95978240
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!64 &95978241
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_SkinWidth: 0.01
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &95978242
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 95978235}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &102745337 --- !u!1 &102745337
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1767,7 +1900,8 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1.5} m_LocalPosition: {x: 0, y: 0, z: 1.5}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children:
- {fileID: 95978236}
m_Father: {fileID: 338663765} m_Father: {fileID: 338663765}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

@ -4,8 +4,19 @@ using UnityEngine;
public class CharacterBehaviour : MonoBehaviour { public class CharacterBehaviour : MonoBehaviour {
// Use this for initialization public Material mat;
void Start () {
private void Awake()
{
mat = new Material(Shader.Find("Standard"));
GetComponent<MeshRenderer>().material = mat;
List<Material> mats = new List<Material>();
mats.Add(mat);
GetComponent<MovieTextureApply>().materials = mats;
}
// Use this for initialization
void Start () {
} }
@ -13,4 +24,6 @@ public class CharacterBehaviour : MonoBehaviour {
void Update () { void Update () {
} }
} }

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class ForzenScreenToWorldSpace : MonoBehaviour { public class FrozenScreenToWorldSpace : MonoBehaviour {
public enum Area public enum Area
{ {
@ -13,10 +13,10 @@ public class ForzenScreenToWorldSpace : MonoBehaviour {
} }
public float width = 1800; public float width = 5;
public float length = 2880; public float length = 8;
public float height = 1080; public float height = 3;
public float blackLength = 320; public float blackLength = 0.89f;
[System.Serializable] [System.Serializable]
public class RenderTextureROI public class RenderTextureROI
{ {
@ -43,7 +43,7 @@ public class ForzenScreenToWorldSpace : MonoBehaviour {
[SerializeField] [SerializeField]
RenderTextureROI Floor = new RenderTextureROI(); RenderTextureROI Floor = new RenderTextureROI();
Dictionary<Area,RenderTextureROI> RenderTextureROIList = new Dictionary<Area, RenderTextureROI>(); Dictionary<Area, RenderTextureROI> RenderTextureROIList = new Dictionary<Area, RenderTextureROI>();
private float totalLength; private float totalLength;
private float totalWidth; private float totalWidth;
@ -61,10 +61,10 @@ public class ForzenScreenToWorldSpace : MonoBehaviour {
RightWall = new RenderTextureROI((height + length) / totalLength, height / totalWidth, height / totalLength, width / totalWidth); RightWall = new RenderTextureROI((height + length) / totalLength, height / totalWidth, height / totalLength, width / totalWidth);
TopWall = new RenderTextureROI((height) / totalLength, 0, length / totalLength, height / totalWidth); TopWall = new RenderTextureROI((height) / totalLength, 0, length / totalLength, height / totalWidth);
Floor = new RenderTextureROI(height / totalLength, height / totalWidth, length / totalLength, width / totalWidth); Floor = new RenderTextureROI(height / totalLength, height / totalWidth, length / totalLength, width / totalWidth);
RenderTextureROIList.Add(Area.LeftWall,LeftWall); RenderTextureROIList.Add(Area.LeftWall, LeftWall);
RenderTextureROIList.Add(Area.RightWall,RightWall); RenderTextureROIList.Add(Area.RightWall, RightWall);
RenderTextureROIList.Add(Area.TopWall,TopWall); RenderTextureROIList.Add(Area.TopWall, TopWall);
RenderTextureROIList.Add(Area.Floor,Floor); RenderTextureROIList.Add(Area.Floor, Floor);
} }
public RenderTextureROI GetROI(Area area) public RenderTextureROI GetROI(Area area)

@ -1,6 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 459796dd748d9e144be3b07d1e653918 guid: c2ff90fc774b218468ffcff9472e0762
timeCreated: 1523936729 timeCreated: 1524212949
licenseType: Free licenseType: Free
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
Loading…
Cancel
Save