Dave Boyle

Basic client / server communication working. Successfully sending messages over …

…the network to load a video.
Showing 222 changed files with 4407 additions and 0 deletions
No preview for this file type
fileFormatVersion: 2
guid: 37da56ded89bead4c8fe5d5e119efa06
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 638fde39baec37944bf5f23e4583cf9e
folderAsset: yes
timeCreated: 1464981812
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3df1765d650dcc64a87b0591ada0d885
folderAsset: yes
timeCreated: 1464981785
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 38f35a7700670f241a99d8d45a9141fe
folderAsset: yes
timeCreated: 1464981785
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!1 &5
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 6}
- 20: {fileID: 7}
- 92: {fileID: 8}
- 81: {fileID: 9}
- 114: {fileID: 10}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!20 &7
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .150000006
far clip plane: 1000
field of view: 70
orthographic: 0
orthographic size: 100
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!92 &8
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
--- !u!81 &9
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bc18b279b733ab946888907433108fa5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!196 &11
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!1 &782348078
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 782348080}
- 114: {fileID: 782348079}
m_Layer: 0
m_Name: MovieManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &782348079
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 782348078}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e97ef6d0bfd7238498bb990e58ae4ca2, type: 3}
m_Name:
m_EditorClassIdentifier:
_logVideoLoads: 1
_useExternalTextures: 0
--- !u!4 &782348080
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 782348078}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!1 &1074124163
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1074124166}
- 33: {fileID: 1074124165}
- 23: {fileID: 1074124164}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1074124164
Renderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1074124163}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: ab72c05bbf469b14b8dc263f3da57a6b, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1074124165
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1074124163}
m_Mesh: {fileID: 4300000, guid: a52e7a3bc245b48dead7ed46dc38ecec, type: 2}
--- !u!4 &1074124166
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1074124163}
m_LocalRotation: {x: 0, y: 1, z: 0, w: -4.37113883e-08}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
--- !u!1 &1848005465
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1848005466}
- 114: {fileID: 1848005467}
m_Layer: 0
m_Name: DemoInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1848005466
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1848005465}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &1848005467
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1848005465}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10fa3ce0e1c037e449490a4f9ca3bf99, type: 3}
m_Name:
m_EditorClassIdentifier:
_title: 360 Sphere Video
_description: This demo shows playback of a 360 degree VR equirectangular video. Use
the mouse to look around.
--- !u!1 &1853078886
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1853078887}
- 114: {fileID: 1853078888}
- 114: {fileID: 1853078890}
m_Layer: 0
m_Name: Movie
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1853078887
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1853078886}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!114 &1853078888
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1853078886}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8225388bc511e1f40be2e753ddefe282, type: 3}
m_Name:
m_EditorClassIdentifier:
_folder:
_filename: sample-sphere-1024x512-divx.avi
_useStreamingAssetsPath: 1
_loop: 1
_colourFormat: 2
_allowAudio: 0
_useAudioDelay: 0
_useAudioMixer: 0
_useDisplaySync: 0
_loadOnStart: 1
_playOnStart: 1
_editorPreview: 0
_ignoreFlips: 1
_volume: .5
_audioBalance: 0
_textureFilterMode: 1
_textureWrapMode: 1
_clips: []
--- !u!114 &1853078890
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1853078886}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72fc29f9cbb939141bc513bfa454dbaa, type: 3}
m_Name:
m_EditorClassIdentifier:
_mesh: {fileID: 1074124164}
_movie: {fileID: 1853078888}
_defaultTexture: {fileID: 0}
fileFormatVersion: 2
guid: e3d8fcbaa9c16d94e8e00718bef11898
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c19938fc9bd298241bff54a2407c0533
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!196 &5
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!1 &1976860020
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1976860021}
- 20: {fileID: 1976860022}
- 92: {fileID: 1976860024}
- 124: {fileID: 1976860025}
- 81: {fileID: 1976860023}
- 114: {fileID: 1976860026}
- 114: {fileID: 1976860027}
- 114: {fileID: 1976860028}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1976860021
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!20 &1976860022
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .097014904, g: .097014904, b: .097014904, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!81 &1976860023
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
--- !u!92 &1976860024
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
--- !u!124 &1976860025
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
--- !u!114 &1976860026
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e97ef6d0bfd7238498bb990e58ae4ca2, type: 3}
m_Name:
m_EditorClassIdentifier:
_logVideoLoads: 1
_useExternalTextures: 0
--- !u!114 &1976860027
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e60819a824743a54d82b5522e52cea3e, type: 3}
m_Name:
m_EditorClassIdentifier:
_folder:
_filename: sample-blue-480x256-divx.avi
_useStreamingAssetsPath: 1
_guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
_async: 1
--- !u!114 &1976860028
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1976860020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10fa3ce0e1c037e449490a4f9ca3bf99, type: 3}
m_Name:
m_EditorClassIdentifier:
_title: Frame Extract
_description: This demo shows how to use scripting to load a movie and extract frames
from it.
fileFormatVersion: 2
guid: 473e3433f3e171c4c8045cb635d6de47
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b35ed56d5659dc4448455cd722998f9e
folderAsset: yes
timeCreated: 1464981786
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: eb821627fb1a0c044a6fd7a6dabe3147
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1102003ee10456942bffb2b369d6a7b8
TrueTypeFontImporter:
serializedVersion: 3
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
fontNames: []
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 41dc463a61e06694b85593cb70e17848
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 89756d2e84d7799499b64043123ddf38
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5fa7bcd58e1876e41952c9349da60879
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b6b9f1741e3bb6241aab55422ae1f133
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ccce2d09cdddb2d4da068267090c1548
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: be0cffc23968d704980274205bc44645
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7fbbedb31432e4d408b2e3fbd0dbd862
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 01d77d6197097f04d92df9c5a034133c
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ea4d6941301057a42beac6f4dfc80562
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8dd8deb53a2651d41b718dc1c9b5d683
folderAsset: yes
timeCreated: 1464981786
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Checker
m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: 2328c4cf9521e554ba76b3ba4b59fd88, type: 1}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
fileFormatVersion: 2
guid: 01779df11e1ccda45a756158a5404329
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2328c4cf9521e554ba76b3ba4b59fd88
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 1024
textureSettings:
filterMode: 0
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: FallOff
m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _Illum
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Cutoff
second: .106153868
data:
first:
name: _InvFade
second: .539999962
data:
first:
name: _EmissionLM
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
data:
first:
name: _TintColor
second: {r: .5, g: .5, b: .5, a: .5}
fileFormatVersion: 2
guid: bb3e8f04c8bae7241a1385563182c4c0
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cc90a732ad112a541100162a44295342
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 1
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 1
mipMapFadeDistanceStart: 2
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 1
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 1024
textureSettings:
filterMode: 1
aniso: 1
mipBias: 0
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: FillBackground
m_Shader: {fileID: 4800000, guid: 8a4586dc48a384548add1a8ad59d54a4, type: 3}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
fileFormatVersion: 2
guid: fe6a8b0c4b26eb946a943716f2a75230
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: InsideSphere
m_Shader: {fileID: 4800000, guid: e5cfefc20f1df4f4593782b611cce905, type: 3}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
fileFormatVersion: 2
guid: ab72c05bbf469b14b8dc263f3da57a6b
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4709c038b4aff104da37cb49fbc4c28c
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b41bea1b7b36cd644a8146d6890d8d1a
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0230324d8fc49374c8e88bc7bfd21f49
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
This diff could not be displayed because it is too large.
fileFormatVersion: 2
guid: a52e7a3bc245b48dead7ed46dc38ecec
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
Shader "Projector/Additive" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
_FalloffTex ("FallOff", 2D) = "" { TexGen ObjectLinear }
}
Subshader {
Pass {
ZWrite off
Fog { Color (0, 0, 0) }
Color [_Color]
ColorMask RGB
Blend One One
Offset -1, -1
SetTexture [_ShadowTex] {
combine texture * primary, ONE - texture
Matrix [_Projector]
}
SetTexture [_FalloffTex] {
constantColor (0,0,0,0)
combine previous lerp (texture) constant
Matrix [_ProjectorClip]
}
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 127f6970f3d965a4896c7cdfdb6431cc
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1c4cd5292ed42dd4db2cdc4451d1abab
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 64
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Shader "UI/Default-ExtraTexture"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_OverlayTex ("Overlay Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
half2 texcoord : TEXCOORD0;
};
fixed4 _Color;
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
#endif
OUT.color = IN.color * _Color;
return OUT;
}
sampler2D _MainTex;
sampler2D _OverlayTex;
fixed4 frag(v2f IN) : SV_Target
{
half4 color = tex2D(_MainTex, IN.texcoord) * IN.color;
color *= tex2D(_OverlayTex, IN.texcoord);
clip (color.a - 0.01);
return color;
}
ENDCG
}
}
}
fileFormatVersion: 2
guid: b5ea53ec906a4de46a3a55cd5e5e7a24
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Shader "UI/Default Font - Extra Texture" {
Properties {
_MainTex ("Font Texture", 2D) = "white" {}
_OverlayTex ("Overlay Texture", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Lighting Off
Cull Off
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 texcoord2 : TEXCOORD1;
};
sampler2D _MainTex;
sampler2D _OverlayTex;
uniform float4 _MainTex_ST;
uniform float4 _OverlayTex_ST;
uniform fixed4 _Color;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color * _Color;
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
#ifdef UNITY_HALF_TEXEL_OFFSET
o.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
#endif
o.texcoord2 = (o.vertex.xy + 1) / 2;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = i.color;
col.a *= tex2D(_MainTex, i.texcoord).a;
clip (col.a - 0.01);
col.rgb *= tex2D(_OverlayTex, i.texcoord2).rgb;
return col;
}
ENDCG
}
}
}
fileFormatVersion: 2
guid: e743b5967a3df1d46a73b81989e531d2
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cb4bf77dfdec29c488807ed356843bbd
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 35647be038e352947ad5087a4630de94
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!1 &5
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 6}
- 20: {fileID: 7}
- 92: {fileID: 8}
- 114: {fileID: 17}
- 114: {fileID: 9}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.79980826}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!20 &7
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!92 &8
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 768c1627121f60f43b408c62ed9ab2f9, type: 3}
m_Name:
m_EditorClassIdentifier:
_guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
_speaker: {fileID: 2800000, guid: 1c4cd5292ed42dd4db2cdc4451d1abab, type: 3}
_material: {fileID: 2100000, guid: bb3e8f04c8bae7241a1385563182c4c0, type: 2}
_numChannels: 8
--- !u!196 &11
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!114 &17
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e97ef6d0bfd7238498bb990e58ae4ca2, type: 3}
m_Name:
m_EditorClassIdentifier:
_logVideoLoads: 1
_useExternalTextures: 0
--- !u!1 &378954966
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 378954967}
- 108: {fileID: 378954968}
m_Layer: 0
m_Name: Point light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &378954967
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.31003428}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!108 &378954968
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_Enabled: 1
serializedVersion: 3
m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_Strength: 1
m_Bias: .0500000007
m_Softness: 4
m_SoftnessFade: 1
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_ActuallyLightmapped: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_ShadowSamples: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
m_IndirectIntensity: 1
m_AreaSize: {x: 1, y: 1}
--- !u!1 &1173302083
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1173302084}
- 33: {fileID: 1173302086}
- 65: {fileID: 1173302087}
- 23: {fileID: 1173302085}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1173302084
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: .955755949}
m_LocalScale: {x: 4.24944258, y: 4.24944258, z: 4.24944258}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!23 &1173302085
Renderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 01779df11e1ccda45a756158a5404329, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1173302086
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &1173302087
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &2128281118
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 2128281119}
- 114: {fileID: 2128281120}
m_Layer: 0
m_Name: DemoInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2128281119
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128281118}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!114 &2128281120
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128281118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10fa3ce0e1c037e449490a4f9ca3bf99, type: 3}
m_Name:
m_EditorClassIdentifier:
_title: Multi Channel Audio
_description: This demo shows how you can control the audio mixer to send video
audio to different audio channels in a 7.1 speaker configuration. This is very
useful for multi-user interactive installations where you want to assign a speaker
per user. Your computer must be set to 7.1 for this to work correctly.
fileFormatVersion: 2
guid: 00afcf5f91508964b9d2b521b1745728
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!1 &5
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 6}
- 20: {fileID: 7}
- 92: {fileID: 8}
- 114: {fileID: 17}
- 114: {fileID: 9}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.79980826}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!20 &7
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!92 &8
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac48693794e43ae42a4d08fd2bc65211, type: 3}
m_Name:
m_EditorClassIdentifier:
_skin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
_guiDepth: 3
--- !u!196 &11
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!114 &17
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e97ef6d0bfd7238498bb990e58ae4ca2, type: 3}
m_Name:
m_EditorClassIdentifier:
_logVideoLoads: 1
_useExternalTextures: 0
--- !u!1 &378954966
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 378954967}
- 108: {fileID: 378954968}
m_Layer: 0
m_Name: Point light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &378954967
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.31003428}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!108 &378954968
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_Enabled: 1
serializedVersion: 3
m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_Strength: 1
m_Bias: .0500000007
m_Softness: 4
m_SoftnessFade: 1
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_ActuallyLightmapped: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_ShadowSamples: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
m_IndirectIntensity: 1
m_AreaSize: {x: 1, y: 1}
--- !u!1 &1173302083
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1173302084}
- 33: {fileID: 1173302086}
- 23: {fileID: 1173302085}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1173302084
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: .955755949}
m_LocalScale: {x: 4.24944258, y: 4.24944258, z: 4.24944258}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!23 &1173302085
Renderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 01779df11e1ccda45a756158a5404329, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1173302086
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1228051957
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1228051958}
- 114: {fileID: 1228051959}
m_Layer: 0
m_Name: DemoInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1228051958
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1228051957}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!114 &1228051959
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1228051957}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10fa3ce0e1c037e449490a4f9ca3bf99, type: 3}
m_Name:
m_EditorClassIdentifier:
_title: Multiple Videos
_description: This demo allows performance testing with multiple videos. Press
the "+" to create another instance of a video.
fileFormatVersion: 2
guid: 7159c7fadb7a71a41836b660557c68f1
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!1 &5
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 6}
- 20: {fileID: 7}
- 92: {fileID: 8}
- 114: {fileID: 12}
- 114: {fileID: 17}
- 114: {fileID: 13}
- 114: {fileID: 14}
- 114: {fileID: 9}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.79980826}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!20 &7
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!92 &8
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 782a63ed2c371794fa17db381425d391, type: 3}
m_Name:
m_EditorClassIdentifier:
_skin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
_demo: {fileID: 13}
--- !u!196 &11
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8225388bc511e1f40be2e753ddefe282, type: 3}
m_Name:
m_EditorClassIdentifier:
_folder:
_filename:
_useStreamingAssetsPath: 0
_loop: 0
_colourFormat: 2
_allowAudio: 1
_useAudioDelay: 0
_useAudioMixer: 0
_useDisplaySync: 0
_loadOnStart: 0
_playOnStart: 0
_editorPreview: 0
_ignoreFlips: 1
_volume: 1
_audioBalance: 0
_textureFilterMode: 1
_textureWrapMode: 1
_clips: []
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f14b6ec72af3052428039addee13c46c, type: 3}
m_Name:
m_EditorClassIdentifier:
_movieA: {fileID: 12}
_movieB: {fileID: 14}
_folder:
_filenames:
- sample-green-480x256-divx.avi
- sample-yellow-480x256-divx.avi
- sample-blue-480x256-divx.avi
- sample-purple-480x256-divx.avi
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8225388bc511e1f40be2e753ddefe282, type: 3}
m_Name:
m_EditorClassIdentifier:
_folder:
_filename:
_useStreamingAssetsPath: 0
_loop: 0
_colourFormat: 2
_allowAudio: 1
_useAudioDelay: 0
_useAudioMixer: 0
_useDisplaySync: 0
_loadOnStart: 0
_playOnStart: 0
_editorPreview: 0
_ignoreFlips: 1
_volume: 1
_audioBalance: 0
_textureFilterMode: 1
_textureWrapMode: 1
_clips: []
--- !u!114 &17
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 5}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e97ef6d0bfd7238498bb990e58ae4ca2, type: 3}
m_Name:
m_EditorClassIdentifier:
_logVideoLoads: 1
_useExternalTextures: 0
--- !u!1 &378954966
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 378954967}
- 108: {fileID: 378954968}
m_Layer: 0
m_Name: Point light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &378954967
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2.31003428}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!108 &378954968
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 378954966}
m_Enabled: 1
serializedVersion: 3
m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_Strength: 1
m_Bias: .0500000007
m_Softness: 4
m_SoftnessFade: 1
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_ActuallyLightmapped: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_ShadowSamples: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
m_IndirectIntensity: 1
m_AreaSize: {x: 1, y: 1}
--- !u!1 &781023460
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 781023461}
- 114: {fileID: 781023462}
m_Layer: 0
m_Name: DemoInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &781023461
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 781023460}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!114 &781023462
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 781023460}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10fa3ce0e1c037e449490a4f9ca3bf99, type: 3}
m_Name:
m_EditorClassIdentifier:
_title: Playlist
_description: This demo shows how to create a playlist.
--- !u!1 &1173302083
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1173302084}
- 33: {fileID: 1173302086}
- 23: {fileID: 1173302085}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1173302084
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: .955755949}
m_LocalScale: {x: 4.24944258, y: 4.24944258, z: 4.24944258}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!23 &1173302085
Renderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 01779df11e1ccda45a756158a5404329, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1173302086
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173302083}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
fileFormatVersion: 2
guid: 0ecbaa6b966332745816a8c4548ce2eb
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8c7f1e159c88c574486d5c2e8c46ea38
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1d418ec00b0c48f478e769e27b2702a4
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e71e47921a23f684aaaa611c87ee966c
folderAsset: yes
timeCreated: 1464981786
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b770602bc32793c478ed2b441c551ff0
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: dc736ba20fb17c94e9492edab0184edb
folderAsset: yes
timeCreated: 1464981786
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class AVProWindowsMediaMaterialMappingDemo : MonoBehaviour
{
public GUISkin _skin;
public AVProWindowsMediaMovie _movie;
private bool _visible = true;
private float _alpha = 1.0f;
public void OnGUI()
{
GUI.skin = _skin;
if (_visible)
{
GUI.color = new Color(1f, 1f, 1f, _alpha);
GUILayout.BeginArea(new Rect(0, 0, 740, 300), GUI.skin.box);
ControlWindow(0);
GUILayout.EndArea();
}
GUI.color = new Color(1f, 1f, 1f, 1f - _alpha);
GUI.Box(new Rect(0, 0, 128, 32), "Demo Controls");
}
void Update()
{
Rect r = new Rect(0, 0, 740, 310);
if (r.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
{
_visible = true;
_alpha = 1.0f;
}
else
{
_alpha -= Time.deltaTime * 4f;
if (_alpha <= 0.0f)
{
_alpha = 0.0f;
_visible = false;
}
}
}
public void ControlWindow(int id)
{
if (_movie == null)
return;
GUILayout.Space(16f);
GUILayout.BeginVertical();
GUILayout.BeginHorizontal();
GUILayout.Label("Folder: ", GUILayout.Width(80));
_movie._folder = GUILayout.TextField(_movie._folder, 192);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("File: ", GUILayout.Width(80));
_movie._filename = GUILayout.TextField(_movie._filename, 128, GUILayout.Width(440));
if (GUILayout.Button("Load File", GUILayout.Width(90)))
{
_movie.LoadMovie(true);
}
GUILayout.EndHorizontal();
bool alphaBlend = _movie._colourFormat == AVProWindowsMediaMovie.ColourFormat.RGBA32;
if (alphaBlend)
alphaBlend = GUILayout.Toggle(alphaBlend, "Render with Transparency (requires movie reload)");
else
alphaBlend = GUILayout.Toggle(alphaBlend, "Render without Transparency");
if (alphaBlend)
{
_movie._colourFormat = AVProWindowsMediaMovie.ColourFormat.RGBA32;
}
else
{
_movie._colourFormat = AVProWindowsMediaMovie.ColourFormat.YCbCr_HD;
}
AVProWindowsMedia moviePlayer = _movie.MovieInstance;
if (moviePlayer != null)
{
GUILayout.BeginHorizontal();
GUILayout.Label("Info:", GUILayout.Width(80f));
GUILayout.Label(moviePlayer.Width + "x" + moviePlayer.Height + " @ " + moviePlayer.FrameRate.ToString("F2") + " FPS");
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Volume ", GUILayout.Width(80));
float volume = _movie._volume;
float newVolume = GUILayout.HorizontalSlider(volume, 0.0f, 1.0f, GUILayout.Width(200));
if (volume != newVolume)
{
_movie._volume = newVolume;
}
GUILayout.Label(_movie._volume.ToString("F1"));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Balance ", GUILayout.Width(80));
float balance = moviePlayer.AudioBalance;
float newBalance = GUILayout.HorizontalSlider(balance, -1.0f, 1.0f, GUILayout.Width(200));
if (balance != newBalance)
{
moviePlayer.AudioBalance = newBalance;
}
GUILayout.Label(moviePlayer.AudioBalance.ToString("F1"));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Time ", GUILayout.Width(80));
float position = moviePlayer.PositionSeconds;
float newPosition = GUILayout.HorizontalSlider(position, 0.0f, moviePlayer.DurationSeconds, GUILayout.Width(200));
if (position != newPosition)
{
moviePlayer.PositionSeconds = newPosition;
}
GUILayout.Label(moviePlayer.PositionSeconds.ToString("F1") + " / " + moviePlayer.DurationSeconds.ToString("F1") + "s");
if (GUILayout.Button("Play"))
{
moviePlayer.Play();
}
if (GUILayout.Button("Pause"))
{
moviePlayer.Pause();
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Frame", GUILayout.Width(80f));
GUILayout.Label(moviePlayer.PositionFrames.ToString() + " / " + moviePlayer.DurationFrames.ToString());
if (GUILayout.Button("<", GUILayout.Width(50)))
{
moviePlayer.Pause();
if (moviePlayer.PositionFrames > 0)
{
moviePlayer.PositionFrames--;
}
}
if (GUILayout.Button(">", GUILayout.Width(50)))
{
moviePlayer.Pause();
if (moviePlayer.PositionFrames < moviePlayer.DurationFrames)
{
moviePlayer.PositionFrames++;
}
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Rate ", GUILayout.Width(80f));
GUILayout.Label(moviePlayer.PlaybackRate.ToString("F2") + "x");
if (GUILayout.Button("-", GUILayout.Width(50)))
{
moviePlayer.PlaybackRate = moviePlayer.PlaybackRate * 0.5f;
}
if (GUILayout.Button("+", GUILayout.Width(50)))
{
moviePlayer.PlaybackRate = moviePlayer.PlaybackRate * 2.0f;
}
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();
}
}
fileFormatVersion: 2
guid: 2ec198953ee163546b88a2037afc374a
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.IO;
using System.Runtime.InteropServices;
public class AVProWindowsMediaPlayVideoDemo : MonoBehaviour
{
public GUISkin _skin;
public AVProWindowsMediaMovie _movie;
public AVProWindowsMediaGUIDisplay _display;
private bool _visible = true;
private float _alpha = 1.0f;
private bool _playFromMemory = false;
private GCHandle _bytesHandle;
private System.IntPtr _moviePtr;
private uint _movieLength;
private void ReleaseMemoryFile()
{
if (_bytesHandle.IsAllocated)
_bytesHandle.Free();
_moviePtr = System.IntPtr.Zero;
_movieLength = 0;
}
private void LoadFileToMemory(string folder, string filename)
{
#if !UNITY_WEBPLAYER
string filePath = Path.Combine(folder, filename);
// If we're running outside of the editor we may need to resolve the relative path
// as the working-directory may not be that of the application EXE.
if (!Application.isEditor && !Path.IsPathRooted(filePath))
{
string rootPath = Path.GetFullPath(Path.Combine(Application.dataPath, ".."));
filePath = Path.Combine(rootPath, filePath);
}
ReleaseMemoryFile();
if (File.Exists(filePath))
{
byte[] bytes = System.IO.File.ReadAllBytes(filePath);
if (bytes.Length > 0)
{
_bytesHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
_moviePtr = _bytesHandle.AddrOfPinnedObject();
_movieLength = (uint)bytes.Length;
_movie.LoadMovieFromMemory(true, filename, _moviePtr, _movieLength, FilterMode.Bilinear, TextureWrapMode.Clamp);
}
}
#else
Debug.LogError("[AVProWindowsMedia] Loading from memory not supported on this platform. Change platform to Standalone.");
#endif
}
public void OnGUI()
{
GUI.skin = _skin;
if (_visible)
{
GUI.color = new Color(1f, 1f, 1f, _alpha);
GUILayout.BeginArea(new Rect(0, 0, 740, 350), GUI.skin.box);
ControlWindow(0);
GUILayout.EndArea();
}
GUI.color = new Color(1f, 1f, 1f, 1f - _alpha);
GUI.Box(new Rect(0, 0, 128, 32), "Demo Controls");
}
void Update()
{
Rect r = new Rect(0, 0, 740, 350);
if (r.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
{
_visible = true;
_alpha = 1.0f;
}
else
{
_alpha -= Time.deltaTime * 4f;
if (_alpha <= 0.0f)
{
_alpha = 0.0f;
_visible = false;
}
}
}
public void ControlWindow(int id)
{
if (_movie == null)
return;
GUILayout.Space(16f);
GUILayout.BeginVertical();
GUILayout.BeginHorizontal();
GUILayout.Label("Folder: ", GUILayout.Width(100));
_movie._folder = GUILayout.TextField(_movie._folder, 192);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("File: ", GUILayout.Width(100));
_movie._filename = GUILayout.TextField(_movie._filename, 128, GUILayout.Width(440));
if (GUILayout.Button("Load File", GUILayout.Width(90)))
{
if (!_playFromMemory)
{
_movie.LoadMovie(true);
}
else
{
LoadFileToMemory(_movie._folder, _movie._filename);
}
}
GUILayout.EndHorizontal();
if (_display != null)
{
GUILayout.BeginHorizontal();
GUILayout.Space(100f);
/*if (_display._alphaBlend)
_display._alphaBlend = GUILayout.Toggle(_display._alphaBlend, "Rendering with Transparency");
else
_display._alphaBlend = GUILayout.Toggle(_display._alphaBlend, "Rendering without Transparency");*/
if (_display._alphaBlend != GUILayout.Toggle(_display._alphaBlend, "Render with Transparency"))
{
_display._alphaBlend = !_display._alphaBlend;
if (_display._alphaBlend)
{
_movie._colourFormat = AVProWindowsMediaMovie.ColourFormat.RGBA32;
}
else
{
_movie._colourFormat = AVProWindowsMediaMovie.ColourFormat.YCbCr_HD;
}
if (!_playFromMemory)
{
_movie.LoadMovie(true);
}
else
{
LoadFileToMemory(_movie._folder, _movie._filename);
}
}
if (_playFromMemory != GUILayout.Toggle(_playFromMemory, "Play from Memory"))
{
_playFromMemory = !_playFromMemory;
if (_movie.MovieInstance != null)
{
if (!_playFromMemory)
{
_movie.LoadMovie(true);
}
else
{
LoadFileToMemory(_movie._folder, _movie._filename);
}
}
}
GUILayout.EndHorizontal();
}
AVProWindowsMedia moviePlayer = _movie.MovieInstance;
if (moviePlayer != null)
{
GUILayout.BeginHorizontal();
GUILayout.Label("Info:", GUILayout.Width(100f));
GUILayout.Label(moviePlayer.Width + "x" + moviePlayer.Height + " @ " + moviePlayer.FrameRate.ToString("F2") + " FPS");
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Volume ", GUILayout.Width(100));
float volume = _movie._volume;
float newVolume = GUILayout.HorizontalSlider(volume, 0.0f, 1.0f, GUILayout.Width(200));
if (volume != newVolume)
{
_movie._volume = newVolume;
}
GUILayout.Label(_movie._volume.ToString("F1"));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Balance ", GUILayout.Width(100));
float balance = _movie._audioBalance;
float newBalance = GUILayout.HorizontalSlider(balance, -1.0f, 1.0f, GUILayout.Width(200));
if (balance != newBalance)
{
_movie._audioBalance = newBalance;
}
GUILayout.Label(moviePlayer.AudioBalance.ToString("F1"));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Audio Delay", GUILayout.Width(100));
int delay = moviePlayer.AudioDelay;
int newDelay = Mathf.FloorToInt(GUILayout.HorizontalSlider(delay, -1000.0f, 1000.0f, GUILayout.Width(200)));
if (delay != newDelay)
{
moviePlayer.AudioDelay = newDelay;
}
float msPerFrame = 1000.0f / moviePlayer.FrameRate;
int frameDelay = Mathf.FloorToInt((float)newDelay / msPerFrame);
GUILayout.Label(moviePlayer.AudioDelay.ToString() + "ms (" + frameDelay + " frames)");
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Time ", GUILayout.Width(100));
float position = moviePlayer.PositionSeconds;
float newPosition = GUILayout.HorizontalSlider(position, 0.0f, moviePlayer.DurationSeconds, GUILayout.Width(200));
if (position != newPosition)
{
moviePlayer.PositionSeconds = newPosition;
}
GUILayout.Label(moviePlayer.PositionSeconds.ToString("F2") + " / " + moviePlayer.DurationSeconds.ToString("F3") + "s");
if (GUILayout.Button("Play"))
{
moviePlayer.Play();
}
if (GUILayout.Button("Pause"))
{
moviePlayer.Pause();
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("Frame", GUILayout.Width(100f));
uint positionFrame = moviePlayer.PositionFrames;
if (positionFrame != uint.MaxValue)
{
uint newPositionFrame = (uint)GUILayout.HorizontalSlider(positionFrame, 0.0f, (float)moviePlayer.LastFrame, GUILayout.Width(200));
if (positionFrame != newPositionFrame)
{
moviePlayer.PositionFrames = newPositionFrame;
}
GUILayout.Label(moviePlayer.PositionFrames.ToString() + " / " + moviePlayer.LastFrame.ToString());
if (GUILayout.RepeatButton("<", GUILayout.Width(50)))
{
if (moviePlayer.PositionFrames > 0)
{
moviePlayer.PositionFrames--;
}
}
if (GUILayout.RepeatButton(">", GUILayout.Width(50)))
{
if (moviePlayer.PositionFrames < moviePlayer.LastFrame)
{
moviePlayer.PositionFrames++;
}
}
GUILayout.EndHorizontal();
}
GUILayout.BeginHorizontal();
GUILayout.Label("Rate ", GUILayout.Width(100f));
GUILayout.Label(moviePlayer.PlaybackRate.ToString("F2") + "x");
if (GUILayout.Button("-", GUILayout.Width(50)))
{
moviePlayer.PlaybackRate = moviePlayer.PlaybackRate * 0.5f;
}
if (GUILayout.Button("+", GUILayout.Width(50)))
{
moviePlayer.PlaybackRate = moviePlayer.PlaybackRate * 2.0f;
}
GUILayout.EndHorizontal();
#if UNITY_EDITOR
GUILayout.Label("Displaying at " + moviePlayer.DisplayFPS.ToString("F1") + " fps");
#endif
}
GUILayout.EndVertical();
}
}
fileFormatVersion: 2
guid: 6504c07c38ac6ec41aae933984864527
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
//-----------------------------------------------------------------------------
// Copyright 2015-2016 RenderHeads Ltd. All rights reserverd.
//-----------------------------------------------------------------------------
namespace RenderHeads.Media.AVProVideo.Demos
{
[RequireComponent(typeof(Transform))]
public class AutoRotate : MonoBehaviour
{
private float x, y, z;
void Awake()
{
float s = 32f;
x = Random.Range(-s, s);
y = Random.Range(-s, s);
z = Random.Range(-s, s);
}
void Update()
{
this.transform.Rotate(x * Time.deltaTime, y * Time.deltaTime, z * Time.deltaTime);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 1ce061c3825c34945a67c7ca4422a7a1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
//-----------------------------------------------------------------------------
// Copyright 2012-2016 RenderHeads Ltd. All rights reserverd.
//-----------------------------------------------------------------------------
namespace RenderHeads.Media.AVProWindowsMedia.Demos
{
public class DemoInfo : MonoBehaviour
{
public string _title;
[Multiline]
public string _description;
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 10fa3ce0e1c037e449490a4f9ca3bf99
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.IO;
public class FrameExtractDemo : MonoBehaviour
{
public string _folder;
public string _filename;
public bool _useStreamingAssetsPath;
public GUISkin _guiSkin;
public bool _async = true;
private static GUIStyle _gridStyle;
private AVProWindowsMedia _movie;
private GUIContent[] _contents;
private Texture2D[] _textures;
private bool _isExtracting;
private int _textureIndex;
private uint _targetFrame;
private uint _frameStep;
private void DestroyTextures()
{
if (_textures != null)
{
for (int i = 0; i < _textures.Length; i++)
{
if (_textures[i])
{
Texture2D.Destroy(_textures[i]);
_textures[i] = null;
}
}
}
}
private bool StartExtractFrames(string filePath, uint numSamples)
{
DestroyTextures();
if (_movie.StartVideo(filePath, true, true, false, false, false, false, false, FilterMode.Bilinear, TextureWrapMode.Clamp))
{
_textures = new Texture2D[numSamples];
_contents = new GUIContent[numSamples];
for (int i = 0; i < numSamples; i++)
{
_contents[i] = new GUIContent(" ");
}
uint numFrames = _movie.DurationFrames;
_frameStep = numFrames / numSamples;
_targetFrame = 0;
_textureIndex = 0;
if (!_async)
{
_isExtracting = true;
while (_isExtracting)
{
#if UNITY_5 && !UNITY_5_0 && !UNITY_5_1
GL.IssuePluginEvent(AVProWindowsMediaPlugin.GetRenderEventFunc(), (int)AVProWindowsMediaPlugin.PluginEvent.UpdateAllTextures);
#else
GL.IssuePluginEvent(AVProWindowsMediaPlugin.PluginID | (int)AVProWindowsMediaPlugin.PluginEvent.UpdateAllTextures);
#endif
UpdateExtracting();
}
return false;
}
return true;
}
return false;
}
void Start()
{
_movie = new AVProWindowsMedia();
}
void Update()
{
if (_isExtracting)
UpdateExtracting();
}
private Texture2D CopyRenderTexture(RenderTexture rt)
{
RenderTexture prevRT = RenderTexture.active;
RenderTexture.active = rt;
Texture2D texture = new Texture2D(rt.width, rt.height, TextureFormat.ARGB32, false);
texture.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0);
texture.Apply(false, false);
RenderTexture.active = prevRT;
return texture;
}
private void UpdateExtracting()
{
_movie.Update(false);
if (_movie.DisplayFrame == _targetFrame)
{
if (_textureIndex < _textures.Length)
{
Texture2D texture = CopyRenderTexture((RenderTexture)_movie.OutputTexture);
texture.Apply(false, false);
_contents[_textureIndex] = new GUIContent("Frame " + _targetFrame.ToString(), texture);
_textures[_textureIndex++] = texture;
}
NextFrame();
}
}
private void NextFrame()
{
_targetFrame += _frameStep;
if (_targetFrame < _movie.DurationFrames)
{
// Seek to frame
_movie.PositionFrames = _targetFrame;
}
else
{
_isExtracting = false;
}
}
void OnDestroy()
{
DestroyTextures();
if (_movie != null)
{
_movie.Dispose();
_movie = null;
}
}
public string GetFilePath()
{
string filePath = Path.Combine(_folder, _filename);
if (_useStreamingAssetsPath)
{
filePath = Path.Combine(Application.streamingAssetsPath, filePath);
}
// If we're running outside of the editor we may need to resolve the relative path
// as the working-directory may not be that of the application EXE.
else if (!Application.isEditor && !Path.IsPathRooted(filePath))
{
string rootPath = Path.GetFullPath(Path.Combine(Application.dataPath, ".."));
filePath = Path.Combine(rootPath, filePath);
}
return filePath;
}
void OnGUI()
{
GUI.skin = _guiSkin;
if (_gridStyle == null)
{
_gridStyle = GUI.skin.GetStyle("ExtractFrameGrid");
}
GUI.enabled = !_isExtracting;
GUILayout.BeginVertical(GUILayout.Width(Screen.width));
GUILayout.BeginHorizontal();
GUILayout.Label("Folder: ", GUILayout.Width(80));
_folder = GUILayout.TextField(_folder, 192, GUILayout.ExpandWidth(true));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label("File: ", GUILayout.Width(80));
_filename = GUILayout.TextField(_filename, 128, GUILayout.MinWidth(440), GUILayout.ExpandWidth(true));
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Extract Frames", GUILayout.ExpandWidth(true)))
{
_isExtracting = StartExtractFrames(GetFilePath(), 24);
}
_async = GUILayout.Toggle(_async, "ASync");
GUILayout.EndHorizontal();
GUILayout.EndVertical();
GUI.enabled = true;
if (_textures != null)
{
if (_gridStyle != null)
GUILayout.SelectionGrid(-1, _contents, 6, _gridStyle, GUILayout.Height(Screen.height-96));
else
GUILayout.SelectionGrid(-1, _contents, 6, GUILayout.Height(Screen.height-96));
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: e60819a824743a54d82b5522e52cea3e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MultiChannelDemo2 : MonoBehaviour
{
public GUISkin _guiSkin;
public Texture2D _speaker;
public Material _material;
public int _numChannels = 8;
private int _seed = 0;
private Vector2[] _speakerPositions;
private bool _normalise;
private float _falloff = 8.0f;
private int _totalUserCount;
private List<MultiChannelDemo2User> _activeUsers = new List<MultiChannelDemo2User>(16);
//private Dictionary<string, int> _loadedSounds = new Dictionary<string, int>(16);
private Texture2D _falloffTexture;
public int NumChannels
{
get { return _numChannels; }
}
void Start()
{
#if UNITY_5 && !UNITY_5_0 && !UNITY_5_1 && !UNITY_5_2 && !UNITY_5_3
Random.InitState(0x1235431 + _seed);
#else
Random.seed = 0x1235431 + _seed;
#endif
_speakerPositions = new Vector2[_numChannels];
UpdateSpeakerPositions();
_falloffTexture = new Texture2D(128, 1, TextureFormat.ARGB32, false);
_falloffTexture.filterMode = FilterMode.Bilinear;
_falloffTexture.wrapMode = TextureWrapMode.Clamp;
UpdateFalloffTexture();
}
private void UpdateFalloffTexture()
{
for (int i = 0; i < _falloffTexture.width; i++)
{
float t = i / (float)(_falloffTexture.width - 1);
float l = GetLevel(t);
_falloffTexture.SetPixel(i, 1, Color.white * l);
}
_falloffTexture.Apply(false, false);
}
void Update()
{
UpdateFalloffTexture();
}
public void DrawFalloff(Vector2 position)
{
_material.mainTexture = _falloffTexture;
_material.SetPass(0);
Matrix4x4 m = Matrix4x4.TRS(position, Quaternion.identity, Vector3.one);
GL.PushMatrix();
GL.LoadPixelMatrix();
GL.MultMatrix(m);
GL.Begin(GL.TRIANGLES);
int numSegments = 36;
float angle = 0.0f;
float angleStep = (Mathf.PI * 2.0f) / numSegments;
for (int i = 0; i < numSegments; i++)
{
float x = Mathf.Sin(angle);
float y = Mathf.Cos(angle);
x *= Screen.width;
y *= Screen.height;
y *= 1.777f;
float z = 0.5f;
GL.TexCoord2(0, 0);
GL.Vertex3(0, 0, z);
GL.TexCoord2(1, 0);
GL.Vertex3(x, y, z);
angle += angleStep;
x = Mathf.Sin(angle);
y = Mathf.Cos(angle);
x *= Screen.width;
y *= Screen.height;
y *= 1.777f;
GL.TexCoord2(1, 0);
GL.Vertex3(x, y, z);
}
GL.End();
GL.PopMatrix();
}
public float GetLevel(float d)
{
return 1.0f - Mathf.Clamp01(d * _falloff);
}
public void UpdateAudioMatrix(Vector2 userPosition, ref float[] values)
{
float valTotal = 0f;
for (int i = 0; i < values.Length; i++)
{
Vector2 sp = _speakerPositions[i];
sp.x /= Screen.width;
sp.y /= Screen.height;
values[i] = 1.0f - Mathf.Clamp01(Vector2.Distance(sp, userPosition) * _falloff);
valTotal += values[i];
}
if (_normalise && valTotal > 0.0f)
{
for (int i = 0; i < values.Length; i++)
{
values[i] /= valTotal;
}
}
}
void UpdateSpeakerPositions()
{
if (_seed == 0)
{
for (int i = 0; i < _speakerPositions.Length; i++)
{
_speakerPositions[i] = new Vector2(_speaker.width/2 + (i*(Screen.width - _speaker.width) / _speakerPositions.Length), Screen.height / 2);
}
}
else
{
for (int i = 0; i < _speakerPositions.Length; i++)
{
_speakerPositions[i] = new Vector2(Random.Range(_speaker.width / 2, Screen.width - _speaker.width / 2), Random.Range(_speaker.height/2, Screen.height - _speaker.height/2));
}
}
}
private void CreateUser()
{
GameObject go = new GameObject("User" + _totalUserCount++);
MultiChannelDemo2User user = go.AddComponent<MultiChannelDemo2User>();
user.name = go.name;
user._guiSkin = _guiSkin;
user._parent = this;
_activeUsers.Add(user);
}
void OnGUI()
{
GUI.skin = _guiSkin;
for (int i = 0; i < _speakerPositions.Length; i++)
{
Rect r = new Rect(_speakerPositions[i].x - _speaker.width / 2, _speakerPositions[i].y - _speaker.height / 2, _speaker.width, _speaker.height);
GUI.DrawTexture(r, _speaker);
r.width = 16;
r.y -= _speaker.height;
r.x += (_speaker.width / 2) - (r.width / 2);
GUI.Label(r, i.ToString());
}
GUILayout.BeginVertical("box");
if (GUILayout.Button("Create Instance"))
{
CreateUser();
}
GUILayout.BeginHorizontal();
GUILayout.Label("Speaker Layout:");
if (GUILayout.Button("Linear"))
{
_seed = 0;
UpdateSpeakerPositions();
}
if (GUILayout.Button("Random"))
{
_seed++;
UpdateSpeakerPositions();
}
GUILayout.EndHorizontal();
_normalise = GUILayout.Toggle(_normalise, "Normalise");
GUILayout.BeginHorizontal();
GUILayout.Label("Falloff");
_falloff = GUILayout.HorizontalSlider(_falloff, 1.0f, 20f);
GUILayout.Label(_falloff.ToString("F1"));
GUILayout.EndHorizontal();
GUILayout.EndVertical();
}
}
fileFormatVersion: 2
guid: 768c1627121f60f43b408c62ed9ab2f9
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MultiChannelDemo2User : MonoBehaviour
{
public GUISkin _guiSkin;
public MultiChannelDemo2 _parent;
private AVProWindowsMediaMovie _movie;
private Rect windowRect = new Rect(0, 0, 320, 220);
private float[] _audioMatrixValues;
private Vector2 Position
{
get { return new Vector2((windowRect.x + (windowRect.width / 2)) / Screen.width, windowRect.y / Screen.height); }
}
void Start()
{
_audioMatrixValues = new float[_parent.NumChannels];
windowRect = new Rect(Screen.width / 2, Screen.height / 2, windowRect.width, windowRect.height);
_movie = this.gameObject.AddComponent<AVProWindowsMediaMovie>();
_movie._useAudioMixer = true;
_movie._loadOnStart = false;
_movie._playOnStart = false;
}
void Update()
{
if (_movie.MovieInstance != null)
{
// Generate audio matrix values
_parent.UpdateAudioMatrix(Position, ref _audioMatrixValues);
// Apply matrix values to movie instance
/*for (int i = 0; i < _audioMatrixValues.Length; i++)
Debug.Log("v " + i + " " + _audioMatrixValues[i]);
Debug.Log("apply to " + _movie.MovieInstance.Handle);*/
AVProWindowsMediaPlugin.SetAudioChannelMatrix(_movie.MovieInstance.Handle, _audioMatrixValues, _audioMatrixValues.Length);
}
}
void OnGUI()
{
GUI.skin = _guiSkin;
windowRect = GUI.Window(this.name.GetHashCode(), windowRect, DoMyWindow, this.name);
//GUI.DrawTexture(new Rect(Position.x * Screen.width - (_target.width / 2), Position.y * Screen.height - (_target.height / 2), _target.width, _target.height), _target);
_parent.DrawFalloff(new Vector2(Position.x * Screen.width, (1.0f-Position.y) * Screen.height));
}
void DoMyWindow(int windowID)
{
if (GUILayout.Button("Play Video"))
{
_movie._folder = "";
_movie._filename = "sample-1920x1024-divx.avi";
_movie._useStreamingAssetsPath = true;
_movie._volume = 1.0f;
_movie._loop = true;
if (_movie.LoadMovie(false))
{
_movie.Play();
}
}
if (_movie.OutputTexture)
{
Rect r = GUILayoutUtility.GetRect(320, 180);
GUI.DrawTexture(r, _movie.OutputTexture, ScaleMode.ScaleToFit);
}
GUI.DragWindow();
}
}
fileFormatVersion: 2
guid: cde5deace05ff78449136a4f3753a625
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MultiVideoDemo : MonoBehaviour
{
public GUISkin _skin;
public int _guiDepth;
private string _folder = string.Empty;
private string _filename = string.Empty;
private bool _visible = true;
private float _alpha = 1.0f;
private GameObject _root;
private List<AVProWindowsMediaGUIDisplay> _movies;
private AVProWindowsMediaGUIDisplay _activeMovie;
private AVProWindowsMediaGUIDisplay _removeMovie;
void Update()
{
Vector2 screenMouse = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y);
// Show/Hide controls based on mouse cursor position
Rect r = new Rect(0, 0, Screen.width/2, Screen.height);
if (r.Contains(screenMouse))
{
_visible = true;
_alpha = 1.0f;
}
else
{
_alpha -= Time.deltaTime * 4f;
if (_alpha <= 0.0f)
{
_alpha = 0.0f;
_visible = false;
}
}
// Remove any movie scheduled for removal
if (_removeMovie)
{
Remove(_removeMovie);
_removeMovie = null;
}
// Activate movie under mouse cursor
_activeMovie = null;
foreach (AVProWindowsMediaGUIDisplay gui in _movies)
{
Rect rect = gui.GetRect();
if (rect.Contains(screenMouse))
{
gui._color = Color.white;
_activeMovie = gui;
}
else
{
//gui._color = Color.white * 0.8f;
gui._color = new Color(0.5f, 0.5f, 0.5f, 0.9f);
}
}
}
void Start()
{
_root = new GameObject("Movies");
_movies = new List<AVProWindowsMediaGUIDisplay>();
// Add some initial videos
string folder = "";
Add(folder, "sample-blue-480x256-divx.avi");
Add(folder, "sample-green-480x256-divx.avi");
Add(folder, "sample-purple-480x256-divx.avi");
Add(folder, "sample-yellow-480x256-divx.avi");
}
private void Add(string folder, string filename)
{
GameObject go = new GameObject();
go.transform.parent = _root.transform;
AVProWindowsMediaMovie movie = go.AddComponent<AVProWindowsMediaMovie>();
movie._folder = folder;
movie._filename = filename;
movie._loop = true;
movie._loadOnStart = false;
movie._playOnStart = false;
movie._useStreamingAssetsPath = true;
AVProWindowsMediaGUIDisplay gui = go.AddComponent<AVProWindowsMediaGUIDisplay>();
gui._movie = movie;
gui._scaleMode = ScaleMode.StretchToFill;
gui._fullScreen = false;
gui._alphaBlend = false;
gui._depth = 5;
gui._color = new Color(0.8f, 0.8f, 0.8f, 1.0f);
_movies.Add(gui);
if (!movie.LoadMovie(true))
{
Remove(gui);
return;
}
UpdateLayout();
}
private void Remove(AVProWindowsMediaGUIDisplay movie)
{
if (movie)
{
_movies.Remove(movie);
Destroy(movie.gameObject);
UpdateLayout();
}
}
private void UpdateLayout()
{
int numMovies = _movies.Count;
int numColRows = Mathf.CeilToInt(Mathf.Sqrt(numMovies));
float width = 1.0f / numColRows;
float height = 1.0f / numColRows;
for (int i = 0; i < numMovies; i++)
{
AVProWindowsMediaGUIDisplay gui = _movies[i];
int x = i % numColRows;
int y = i / numColRows;
gui._x = width * x;
gui._y = height * y;
gui._width = width;
gui._height = height;
}
}
public void ControlWindow(int id)
{
GUILayout.BeginVertical("box", GUILayout.MinWidth(400));
GUILayout.BeginHorizontal();
GUILayout.Label("Folder: ", GUILayout.Width(100));
_folder = GUILayout.TextField(_folder, 192);
GUILayout.EndHorizontal();
GUILayout.Space(16f);
GUILayout.BeginHorizontal();
GUILayout.Label("File Name: ", GUILayout.Width(100));
_filename = GUILayout.TextField(_filename, 192, GUILayout.MinWidth(256f));
if (GUILayout.Button("Add Video", GUILayout.Width(128)))
{
Add(_folder, _filename);
}
GUILayout.EndHorizontal();
GUILayout.Space(16f);
if (GUILayout.Button("Remove All"))
{
for (int i = 0; i < _movies.Count; i++)
{
Destroy(_movies[i].gameObject);
_movies[i] = null;
}
_movies.Clear();
UpdateLayout();
}
GUILayout.EndVertical();
}
private void DrawVideoControls(Rect area, AVProWindowsMediaGUIDisplay movieGUI)
{
AVProWindowsMediaMovie movie = movieGUI._movie;
AVProWindowsMedia player = movie.MovieInstance;
if (player == null)
return;
// Close button
if (GUI.Button(new Rect(area.x + (area.width - 32) ,area.y, 32, 32), "X"))
{
_removeMovie = movieGUI;
}
// Duplicate button
if (GUI.Button(new Rect(area.x + (area.width - 64) ,area.y, 32, 32), "+"))
{
Add(movie._folder, movie._filename);
}
// Video properties
GUILayout.BeginArea(new Rect(area.x, area.y, area.width/2, area.height/2));
GUILayout.Label(player.Width + "x" + player.Height + "/" + player.FrameRate.ToString("F2") + "hz");
GUILayout.EndArea();
GUILayout.BeginArea(new Rect(area.x, area.y + (area.height - 32), area.width, 32));
GUILayout.BeginHorizontal();
float position = player.PositionSeconds;
float newPosition = GUILayout.HorizontalSlider(position, 0.0f, player.DurationSeconds, GUILayout.ExpandWidth(true));
if (position != newPosition)
{
player.PositionSeconds = newPosition;
}
if (player.IsPlaying)
{
if (GUILayout.Button("Pause", GUILayout.ExpandWidth(false)))
{
player.Pause();
}
}
else
{
if (GUILayout.Button("Play", GUILayout.ExpandWidth(false)))
{
player.Play();
}
}
GUILayout.EndHorizontal();
GUILayout.EndArea();
}
void OnGUI()
{
GUI.skin = _skin;
GUI.depth = _guiDepth;
if (_activeMovie)
{
DrawVideoControls(_activeMovie.GetRect(), _activeMovie);
}
if (_visible)
{
GUI.color = new Color(1f, 1f, 1f, _alpha);
GUILayout.Box("Demo Controls");
//GUILayout.BeginArea(new Rect(0, 0, 440, 200), GUI.skin.box);
ControlWindow(0);
}
else
{
GUI.color = new Color(1f, 1f, 1f, 1f - _alpha);
GUI.Box(new Rect(0, 0, 128, 32), "Demo Controls");
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: ac48693794e43ae42a4d08fd2bc65211
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 700
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class PlayQueueDemo : MonoBehaviour
{
public AVProWindowsMediaMovie _movieA;
public AVProWindowsMediaMovie _movieB;
public string _folder;
public List<string> _filenames;
private AVProWindowsMediaMovie[] _movies;
private int _moviePlayIndex;
private int _movieLoadIndex;
private int _index = -1;
private bool _loadSuccess = true;
private int _playItemIndex = -1;
public AVProWindowsMediaMovie PlayingMovie { get { return _movies[_moviePlayIndex]; } }
public AVProWindowsMediaMovie LoadingMovie { get { return _movies[_movieLoadIndex]; } }
public int PlayingItemIndex { get { return _playItemIndex; } }
public bool IsPaused { get { if (PlayingMovie.MovieInstance != null) return !PlayingMovie.MovieInstance.IsPlaying; return false; } }
void Start()
{
_movieA._loop = false;
_movieB._loop = false;
_movies = new AVProWindowsMediaMovie[2];
_movies[0] = _movieA;
_movies[1] = _movieB;
_moviePlayIndex = 0;
_movieLoadIndex = 1;
NextMovie();
}
void Update()
{
if (PlayingMovie.MovieInstance != null)
{
if ((int)PlayingMovie.MovieInstance.PositionFrames >= (PlayingMovie.MovieInstance.DurationFrames - 1))
{
NextMovie();
}
}
if (!_loadSuccess)
{
_loadSuccess = true;
NextMovie();
}
}
void OnGUI()
{
AVProWindowsMediaMovie activeMovie = PlayingMovie;
if (activeMovie.OutputTexture == null)
activeMovie = LoadingMovie; // Display the previous video until the current one has loaded the first frame
Texture texture = activeMovie.OutputTexture;
if (texture != null)
{
Rect rect = new Rect(0, 0, Screen.width, Screen.height);
if (activeMovie.MovieInstance.RequiresFlipY)
{
GUIUtility.ScaleAroundPivot(new Vector2(1f, -1f), new Vector2(0, rect.y + (rect.height / 2)));
}
GUI.DrawTexture(rect, texture, ScaleMode.ScaleToFit, false);
}
}
public void Next()
{
NextMovie();
}
public void Previous()
{
_index -= 2;
if (_index < 0)
_index += _filenames.Count;
NextMovie();
}
public void Pause()
{
if (PlayingMovie != null)
{
PlayingMovie.Pause();
}
}
public void Unpause()
{
if (PlayingMovie != null)
{
PlayingMovie.Play();
}
}
private void NextMovie()
{
Pause();
if (_filenames.Count > 0)
{
_index = (Mathf.Max(0, _index+1))%_filenames.Count;
}
else
_index = -1;
if (_index < 0)
return;
LoadingMovie._folder = _folder;
LoadingMovie._filename = _filenames[_index];
LoadingMovie._useStreamingAssetsPath = true;
LoadingMovie._playOnStart = true;
_loadSuccess = LoadingMovie.LoadMovie(true);
_playItemIndex = _index;
_moviePlayIndex = (_moviePlayIndex + 1)%2;
_movieLoadIndex = (_movieLoadIndex + 1)%2;
}
}
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.